LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading data from text file and saving it in a database table

 please find the attached text file

i want to open tthis text file read this file...between the delimiters ### ..and the END ... i want to save the data
in a database table... in excel or sql...  like forexample the following data will be saved in the table as


abcxxx123; name:john adress:abc123 weight:65kg phn-no:123123


customerid. |  customername|   address| weight |  phn-no
--------------------------------------------------------------------------------
abcxxx123   |  john               |  abc123  | 65kg   | 123123 

0 Kudos
Message 1 of 2
(3,911 Views)

You asked this same question a couple of months ago: https://forums.ni.com/t5/LabVIEW/Reading-Data-From-text-File/m-p/1756390#M612805

 

 

Well, you can use the Read Text file to read the file, and then just extract the lines... Ben64 showed you a method to use regular expressions. That's one way.

 

For Excel you can use the Report Generation Toolkit, or you can code it yourself using ActiveX. There's an example that ships with LabVIEW on writing a table to Excel.

 

For database operations you can use the Database Toolkit, or you can try to use LabSQL.

0 Kudos
Message 2 of 2
(3,907 Views)