LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to name a new Excel worksheet using an invoke node??

I want output from my specific labview code to be written to a new and specific worksheet (meaning I want to provide the specific worksheet name) of an Excel spreadsheet my LabVIEW code will generate. My code will run in a loop where I want data that is generated in each pass of the loop to be written to a new worksheet each time through the loop. I know how to do this if I am ok with just having each worksheet be named 4, 5, 6, etc (on top of the 1, 2 and 3 that comes standard with a new Excel spreadsheet) but I want more meaningful names than just those numbers... So how do I add a new worksheet and give it a name of my choosing??? Also, when right click on an invoke node and then click on "Help for Item" which is right under the Methods selection that comes up, nothing happens, meaning I am not directed to any help file. I see that same behavior under LabVIEW 6.1 and also under LabVIEW 7.1. My guess is either I didn't buy some option required to have that help area be populated or I had it as some option but didn't know to install it when I originally installed LabVIEW??? Having that help available might help answer the question I pose above... I find working with ActiveX components to not be straightforward. Granted I haven't done it much and what I have done has been sort of follow examples and get it to work... But on this naming a new worksheet I have found no useful examples. My guess is it's easy but I'm clueless... Any help would be much appreciated... Note, in case it matters, I do not own the Report Generation tool/capability... thanks... bob...
0 Kudos
Message 1 of 4
(3,843 Views)
...Upon further review I have discovered that I DO OWN the Report Generation Toolkit as I own the Professional Developer Suite... I just never before checked that deeply to see that I own it... So, any help with my previously posted question is still sought but now with the added knowledge that I do have (and have since installed) this Report Generation capability.. thanks... bob...
0 Kudos
Message 2 of 4
(3,835 Views)
Hi, Paris1:

Take a look at "Excel Workbook Properties", that is located in





REPORT GENERATION
-> EXCEL SPECIFIC
-> EXCEL GENERAL
-> EXCEL WORKBOOK PROPERTIES





One of its outputs is "Current Worksheet Name".





You can insert a ExcelWorkbookProperties VI in a blank VI and then double-click it.





You will se a rose vi named Excel Get Properties
And inside it (double-clicking it), the way Worksheet's name is got. If you "Change to Write" that property node, you can set it's name.





This way is very complicated, it can be done faster, but this way you can see a process to do that, and checking it, you can build your own excel VIs to do specific tasks.





Hope it helps,



Aitortxo.
0 Kudos
Message 3 of 4
(3,822 Views)

Hi Bob,

In the attached VI you can add a worksheet with a name from the indicator 'Name' to a existing Excel file using ActiveX

0 Kudos
Message 4 of 4
(3,819 Views)