LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data manipulation with excel

I have created an automated test that opens an excel spreadsheet and retrieves a serial number and does the testing and writes all the data to the same spreadsheet. Now I am being asked to modify this to create a new spreadsheet for each work order. Is there a way using activex or otherwise to open an existing spreadsheet so that all my row and column settings are retained. Then write code that will add a set amount of serial numbers dependent on the amount of boards being tested in the work order Do all the testing then save the worksheet as a different name? I am thinking I can get most of this done just not sure how the serial number part would work. Any help is greatly appreciated.

 

Chirs73

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

I would look into using an excel template for doing this. I'm not sure how this is done using activex but I have done it using the Microsoft Office Report Generation toolkit purchased from NI. I think the old version of this toolkit used activex under the hood so it should be possible.

 

Hope this helps.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 2 of 3
(2,828 Views)
You've asked in the past about using ActiveX for Excel, so you already know about this. Thus, we can skip that part of the answer. Smiley Wink You can open a workbook, add whatever you want, and save it under a different name. That's the SaveAs method for a workbook (you save workbooks, not worksheets). However, from what you're describing it sounds like what you actually want to use is an Excel workbook template.
0 Kudos
Message 3 of 3
(2,827 Views)