LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

manipulating excel files

I'm collecting data that is writing to a spreadsheet file as it collects each data point, once every 1 second.  At the end of the experiment I want to append some notes to that file.  The data is an array of 1-D. 

I want to be able to move those notes to the top of the excel file, in column B or C.  When I open the file now, the notes are at the bottom of the excel page.  The notes are in string format, using the write characters to a file option. 

I've thought of three possible ways to solve this, none of which have worked yet.
1.  Convert the string to an array.  With an array you can use the transpose function and other functions to move the end elements to the top.

2.  Append a character such as 'shift + enter' to the string so that when its open in excel, excel will understand that as a move up one row.  To move across a column, i can use the Tab constant.  The problem is that I dont know how to input ascii values and i dont know the ascii value for the shift key.

3.  In Excel, set up a macro to find the notes and move them to the top of the page.  The problem i ran into is that each experiment will have a different amount of data points, depending on how long it ran for.  Finding the notes at the bottom of the page (and the notes vary is size as well) has been hard.  One thing i could do is search for the data, the first thing i enter in the notes. 

any help with this would be greatly appreciated.  Thank you
0 Kudos
Message 1 of 4
(2,793 Views)
Hi,

Why don't you just write annotation into B1 oder C1? You can do this with the "Row Col To Change Format.vi".
I have attached a part of an example.

Regards
Yves
0 Kudos
Message 2 of 4
(2,780 Views)
im using labview 7.1, OS X version.
active X doesnt work on mac computers
0 Kudos
Message 3 of 4
(2,764 Views)
Babmi,

It sounds like instead of using Excel files you should think about using text files that are formatted in the spreadsheet format.  This would make things a little easier when you translate them into something LabVIEW can understand.  If the files are saved in a tab delimited text file you should be able to open them in LabVIEW without any problems.  Once you have them in array format you can certainly use the transpose functions to move data around. 

Hope this helps!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 4 of 4
(2,744 Views)