LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing data to an Excel worksheet using LabVIEW

I am currently writing numerical data to Excel using Invoke and Property Nodes in LabVIEW. My problem is that I want the data to be written to Excel but I want the spreadsheet to stay hidden until the writing process is complete.. Writing all the data on the screen takes upwards of two minutes for a spreadsheet that is only 1024 rows long (by about 20 columns wide). I see a Worksheet property called "visible" but I cannot find anywhere the acceptable values for this parameter. It's NOT binary as I would have guessed it to be but istead "visible" is asking for a 32 bit Integer. I need to know what 32 bit Integer numeric value might correspond to "not visible". Or is there some other way to hide the spreadsheet while I
write to it??

Also, when I right click on "Visible" among other things I get an option that says "Help for Visible" but when I select that nothing happens.. When I right click on any parameter of an invoke or property node, I get the same "Help for xxxx" but again nothings happens... What have I failed to install in terms of help files?? And can anyone answer my question about how to hide the spreadsheet while it is being written to or any other way to greatly speed up this writing to excel process?? Any help would be appreciated... thanks..
0 Kudos
Message 1 of 3
(2,853 Views)
Look at the shipping example called Write Table to XL. The first VI opens and Excel and uses the application property visible. You can set it to false at the beginning and true when you write is complete. I don't know if that will help your speed issues. It might be dependent on how you're writing. Individually populating cells is slower than writing a whole range at once.
0 Kudos
Message 2 of 3
(2,853 Views)
The invoke nodes are just calling methods which are exposed by the Excel ActiveX interface, and thus there's not going to be specific LabVIEW help on them. I find the following MSDN link helpful when I'm programming Excel via ActiveX:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaxl10/html/xltocObjectModelApplication.asp
That will tell you the name of all of the constants which can be written to properties like visible. You'll have to then figure out the integer values which correspond to those constants, I usually just Google them. The following link has a pretty good list:
http://www.geocities.com/ResearchTriangle/9834/msexcel8.htm
There are also books out there which have all of this information, although I can't recommend any specific
ones.
Regards,
Ryan K.
0 Kudos
Message 3 of 3
(2,853 Views)