07-10-2012 09:52 AM
Hi everyone, i'm trying to export a table to excel and I'm having some trouble.
First, I used "Write To Spreadsheet File.vi" to create a .xls file, and that worked perfectly, but now I need to export another table to a different sheet of the same xls file (whose name we should be able to choose), so I've begun to use the ActiveX controls.
I can create the new sheet with the name desired, and write the data into it, but the problem is that it doesn't show only my table, but also ALL of the cells (65536 x VI) with the value #N/A.
I can solve the problem in one of the dimensions, but not in both of them. It's the first time I use the ActiveX functions (I've built this VI with the help of other examples I've found in the forum), so I think I'm missing something important.
What can I do to show ONLY my table?
Thanks a lot for your time and knowledge.
Solved! Go to Solution.
07-10-2012 11:35 AM
07-10-2012 11:51 AM
Also, you are closing twice the _Workbook reference thus generating an error. Here's how to do it. The Row Col To Range Format.vi was taken from here.
Ben64
07-11-2012 02:28 AM
Thank you very much ben64, now I understand better how the ActiveX works (specially the "Cell1" and "Cell2" properties of "Range"), and the program does exactly what I wanted it to do.
Now I added a few things just to close and save without showing the Excel window (the "workbook close" and "application quit" nodes, and the FALSE value to the "visible" entry of the "OPEN EXCEL" block ), but what I get by doing what you can see in the attached picture is Excel fastly opening and closing in less than a second... Any idea of how to do it without seeing the Excel window?
Thanks again
Arubio10
07-11-2012 02:39 AM
If you have report generation toolkit installed along with your labview.
then it will give much flexibility to write data into excel file. also you can do some analysis of the data.
07-11-2012 02:44 AM
That's the problem, Prabhakant Patil, we don't have it at the moment (they're planning to buy it for newer versions of LabVIEW, but for now I have to use ActiveX).
Thanks
Arubio10
07-11-2012 08:38 AM
07-12-2012 01:57 AM
Thanks ben64, that should work