LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert/create new rows/columns into Excel

Hello all,

Is there a property node which I can use to insert a new column or row into a specific worksheet, at a specific column/row.

I am using Labview 6.0

I have tried searching through all of the properties and methods related to excel worksheets, but with no return.

Thank you immensly in advance!

Dean.
0 Kudos
Message 1 of 4
(2,784 Views)
Hi,

I am not very sure if you can directly insert into an Excel sheet, but what you can do is to call it in Labview as a 2D array insert where ever you want and save it back to the Excel sheet, you can as well overwrite/create new excel sheet in such case.
Regards,
Sreedhar T
0 Kudos
Message 2 of 4
(2,772 Views)
Hi,

Yes you can directly insert data into an Excel worksheet. You have to use ActiveX functions.

Go to "Search examples" and search for "Excel". Then you will get some examples about Excel. The "Write table to Excel" is a good example for how to write data to excel.

Hope this help!!!

BJK
0 Kudos
Message 3 of 4
(2,757 Views)
Hi,

Thank you for the great suggestions.

However, I think I didn't make myself clear. I wanted to "insert new rows/columns", not "insert new data" in Excel directly from Labview. I think an example would make my point clearer.


Say I already have an excel file such as


One
Two
Three
Four


And I want to insert Five in between One and Two, then I would need to create a new row in the excel file in order to obtain

One
Five
Two
Three
Four


I have solved my problem by writing a macro in excel and calling the macro from Labview.
Initially I was hoping to call the "insert new row" direcly via labview, without the need to call a macro.

Thanks again
0 Kudos
Message 4 of 4
(2,732 Views)