‎05-14-2012 04:35 AM
How to write data into Excel sheet and if I want to enter a new data it should not replace the old data rather it should be at the top row and older data pushed down the row?
Also how to select a particular element of that Excel sheet and display it on the front panel?
‎05-14-2012 07:44 AM
To program Excel you have two options:
‎05-14-2012 08:01 AM
Reading from Excel worksheet is fairly straigthtforwrd. The included examples with LabVIEW show you how.
Generally people keep appending new data.
I would suggest that instead of pre-pending new data as you want to do.
‎05-14-2012 08:12 AM
Mostly pre-pending the data to any file directly is not possible (as far I know) what you have to do in that case is you need to read the entire data and keep it in memory and insert the data at the top and the write the whole data again to the same file overwriting the old content. This will be valid for files of smaller size if the file size grows bigger you may need to chunk the data and take only the portion where you want insert the data.
‎05-14-2012 08:13 AM
Of course, you could also take the easy approach, and simply deal with text files. Then you don't have to worry about ActiveX. Just use the Write to Spreadsheet File VI. It can create a delimited text file that you can import into Excel.
‎05-14-2012 08:33 AM
Yes, but that won't help him with his wanting to pre-pend data.
‎05-14-2012 08:36 AM
‎05-14-2012 09:42 AM
@nyc_(is_out_of_here) wrote:
Yes, but that won't help him with his wanting to pre-pend data.
Why not? Read the file. Prepend your string. Write out the new string to the file.
‎05-14-2012 09:44 AM
@smercurio_fc wrote:
@nyc_(is_out_of_here) wrote:
Yes, but that won't help him with his wanting to pre-pend data.
Why not? Read the file. Prepend your string. Write out the new string to the file.
I know that, but I was referring to his unspoken expectation that he can just write data and have it automatically be pre-pended.
‎05-14-2012 09:49 AM
Ah, well, sometimes we can't cure someone's expectations on how the universe works (without checking first) vs how it actually does.