From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing Data to Second worksheet of Excel workbook without opening it

I currently have a VI set up to write data from different table controls, boolean controls, and string controls to a .xls format excel file. However, all that data is written to one worksheet. I have a second data table that is recording the user's clicking actions. Knowing that those actions can add up pretty quickly, I want to store that data to a separate worksheet of the same existing .xls excel file. 

 

My issue is that my current way is opening up the .xls file to add the second worksheet and then the data to finally close the excel program. I don't want excel to open up and close, so I'm wondering if there was a way to  store the data to a second worksheet without opening up the actual user interface of Excel.

 

I've read into storing the data as a TMDS file extension, but then I would have to install the TDMS add on into excel to read it, if I wanted to see if the information was being stored correctly. If I went the TDMS route, would it be possible to store the data from the different controls I have into their respective columns/rows/worksheet and also later read it back to those controls later on?

 

 

0 Kudos
Message 1 of 4
(2,246 Views)

Hello,

 

It is possible. Use local help of LabVIEW to see some examples.

 

Regards,

Fred.

 

Kudos are welcome!Smiley Wink

0 Kudos
Message 2 of 4
(2,237 Views)

Hello,

Try this path Functions-->Programming-->Report generation-->Excel specific-->Excel advance   In that you will find functions which will help you to do file operations which you're asking.

Expand.Evolve.Influence
0 Kudos
Message 3 of 4
(2,237 Views)

What do you mean, "Excel workbook without opening it"?  The Report Generation Toolkit works by running Excel, so if by "open" you mean "run", then you need to abandon the RGT and find "another way".  However, if by "open" you mean "Show the Excel Workbook in an "Excel Window" (or "instance"), then look at the Help for New Report, particularly the first few Controls.

 

Bob Schor

0 Kudos
Message 4 of 4
(2,186 Views)