07-17-2014 10:19 AM
Hi Folks -
Here is what I thought would be a simple task. I want to use the run-time shortcut menu to export data to excel from a table control, which is an option in the default menu.
The two things I would like to be able to do are:
1) Either the whole table including the headers or
2) Perform a selection of rows during run-time to export to excel
From a prior discussion, it appear that there is a bug in this functionality. When I tried to create my own code to perform the selection programmatically, my table was resized to a thumbnail while running the VI, and the export still not work properly.
http://forums.ni.com/t5/LabVIEW/Export-table-to-excel/m-p/1089007#M481882
Any further thoughts on this are appreciated. I have some workarounds but would like to see this working.
07-17-2014 10:51 AM
If you happen to have it, the Report Generation Toolkit works well for this kind of thing. I've always used it whenever I need to talk with Office. There is also a VI that returns the ActiveX reference to the document that is being worked on, which greatly extends what you can do.
07-17-2014 11:10 AM
I don't currently have the Report Generation Toolkit for Microsoft Office. What I was hoping to do is pretty simple and I believe inherent functionality in LabVIEW. Years ago I used ActiveX for something similar. I am using 64-bit LabVIEW now - I don't think ActiveX is supported for 64-bit.
07-18-2014 02:06 PM
Maybe you could incorporate some array manipulation to dictate which data is sent to the write to measurement/spreadsheet file. Is it possible to parse out the data in the table?
07-18-2014 02:45 PM
I have a workaround using Write to Spreadsheet. However, since this is an option in LabVIEW that is presented to the user, it would be nice to get it working.
07-18-2014 08:22 PM
As far as I know, if you want to read or write Excel workbooks in LabVIEW, you really need the Report Generation Toolkit. The nice thing about this is that the Toolkit now is quite nice, and really works better than NI realizes! And (for the most part) you don't need to use ActiveX, which seems to be going "out of support" (or at least "out of mind").
BS
07-19-2014 10:17 AM - edited 07-19-2014 10:37 AM
@DonRothGE wrote:
Hi Folks -
Here is what I thought would be a simple task. I want to use the run-time shortcut menu to export data to excel from a table control, which is an option in the default menu.
The two things I would like to be able to do are:
1) Either the whole table including the headers or
2) Perform a selection of rows during run-time to export to excel
From a prior discussion, it appear that there is a bug in this functionality. When I tried to create my own code to perform the selection programmatically, my table was resized to a thumbnail while running the VI, and the export still not work properly.
http://forums.ni.com/t5/LabVIEW/Export-table-to-excel/m-p/1089007#M481882
Any further thoughts on this are appreciated. I have some workarounds but would like to see this working.
First, try to save to the oldest version of VI you can so that the most people are able to view your VI.
Not everybody has the latest LabVIEW installed. Strange but true.
Second, I opened your VI and I don't see anything except a While loop and a Stop button with a Table control. No other code.
I have no clue what you are doing with regards to "perform the selection programmatically".
Anyway, I select cells on the Table control using Property Node Selection Size and Property Node Selection Node and the Invoke Node to export the data to Excel, it works for me.
Excel opens up and I see one worksheet which is populated with the values from the Table control.
I have Excel 2010.
However, it looks like you will need to manually save the opened Excel file.
07-21-2014 06:34 AM
Hello -
The VI included was the simplest form of an example showing you a table with an example row to export to excel.
Using the APPLICATION menu item "Export Data to Excel" as a right-click option for the table one should not have to create any new code. That being said, I did try coding as well a few days back using the invoke node to Export Data to Excel and property nodes for SelStart and Size. The code resized my table to a thumbnail on the interface! and did not export the data properly.
I am using LabVIEW 64-bit by the way.
As far as the report generation toolkit goes, I am not sure it would be compatible with LabVIEW 64-bit. It is not clear from the product description.
Thanks,
Don
07-21-2014 07:29 AM - edited 07-21-2014 07:31 AM
@DonRothGE wrote:
Hello -
The VI included was the simplest form of an example showing you a table with an example row to export to excel.
Using the APPLICATION menu item "Export Data to Excel" as a right-click option for the table one should not have to create any new code. That being said, I did try coding as well a few days back using the invoke node to Export Data to Excel and property nodes for SelStart and Size. The code resized my table to a thumbnail on the interface! and did not export the data properly.
I am using LabVIEW 64-bit by the way.
As far as the report generation toolkit goes, I am not sure it would be compatible with LabVIEW 64-bit. It is not clear from the product description.
Thanks,
Don
I don't understand what you mean by "one should not have to create any new code"?
From where are you getting this idea?
I wrote how I was able to get Exprort Data to Excel to work for me with LabVIEW 2013 32-bit.
Instead of harping on the fact that you have LabVIEW 64-bit, perhaps you should try doing what I did.
Try downloading LabVIEW 2013 32-bit and see how that works for you.
07-21-2014 07:50 AM
nyc - This application item is a built-in labview functionality that should work without external code. I am a 20-year LabVIEW developer. Lose your new york city attitude and read my posts - which basically says I tried the things you mention even though I should not really have to. Also, my DE is LabVIEW 64-bit. It makes no sense for me to work in LabVIEW 32-bit.