LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

opening a file in excel

Hi,
 
I was wondering if anyone can guide me through the problem i am having. Basically i have a program that collects all the data and save it to a .log file....below is what the file would look it....
 
13.29.42     3.523   assd    25   54   100     1       1       0         1     1      1
 
I tried copying the contents in putting it into excel so that i can plot using the columns, but it gets pasted in one cell thus cant plot individual column with respect to one another...so is there a way i can go round this.  i tried saving the file as .xls.....but excel doesnt open it... to save the data i use FmtFile( )
 
Looking forward for a prompt response.
 
Thanks
 
k1_ke
 
 
 
0 Kudos
Message 1 of 5
(3,198 Views)
Just  to inform anyone who was goin to help me out...I was able to solve my problem by adding comma's after each variable and then open in excel.....
 
thanks
 
k1_ke
0 Kudos
Message 2 of 5
(3,186 Views)

Excel file format is not only a matter of extension: an excel workbook (.xls) contains several informations about creator name and date, styles used, various sheets contained in the workbook, formulas and macros embedded in the sheets and so on: this is not a simple format to generate, but in your case you may not need all this stuff since you simply want to load a file and separate data in columns.

From what you say, it seems that data is separated with spaces: if you can modify the program that generates test data, you can separate various items in a row by means of tabs (embedding "\t" in the format string in FmtFile) and name the file with .CSV extension: this way excel should automatically open the file and distribute its contents in columns as you want.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 5
(3,187 Views)
I go with Roberto. You just try to open the *.log file as follows.
 
1. Please make your application closes the log file.
2. Press "SHIFT " & Right click the *.log file.
3. You will find "OPEN WITH "  open in the mouse pop up menu.
4. Selec excel to open your *.log file.
See the result.
0 Kudos
Message 4 of 5
(3,182 Views)

Hi Roberto and Kumar,

Thank you very much for you help. Yeah first i had it separated with spaces but now i am using tabs. It works great!

Thanks once again for you help.

k1_ke

0 Kudos
Message 5 of 5
(3,168 Views)