06-04-2007 01:23 AM
Hi,
This VI was ment for someone that was already working with LV and VBA.
If you want some explanation about the VBA part wel I never understood the strange ways of Microsoft and I think I never will
For the LV part I think you have to follow a course or look at the Excel board for documented VI's
06-04-2007 12:44 PM
Hello,
The posted example uses several property nodes. Property Nodes are used to read/write properties of a reference. You will find further information at the link below.
LabVIEW 8.2 Help: Property Nodes
http://zone.ni.com/reference/en-XX/help/371361B-01/glang/property_node/
Please post back if you have specific questions about the example VI.
Elizabeth S.
Applications Engineer
National Instruments
05-10-2023 01:39 AM
Hi KC,
thank you for the VI Excel File WS names. But I am trying to figure out the reference Excel.Worksheet. How did you create that reference. I am only able to create reference for either sheets or workbook. So how do we create worksheet ref. Thank you.
05-10-2023 04:51 AM
@govindsankar wrote:
Hi KC,
thank you for the VI Excel File WS names. But I am trying to figure out the reference Excel.Worksheet. How did you create that reference. I am only able to create reference for either sheets or workbook. So how do we create worksheet ref. Thank you.
Seems like you have posted in a very old thread, Its always better to start a new thread if you have a new query and what exatly is your issue ,Getting Sheet names/ Reference for work sheets?
05-10-2023 07:04 AM
My objective is to get sheet names. But I downloaded the program from this page trying to understand how its done. I understood 90% of it. But there is one portion in the program which is a reference called Excel.Worksheet. I dont know where the reference is coming from. So since its part of a program written by someone in this thread, I think there is no use in starting a new thread. Because the one who wrote the program has to answer this I think. Thank you.
05-10-2023 07:46 AM
Browse for the Excel application Installed location and select specific objects.
05-10-2023 08:23 PM
The Report Generation Toolkit can be a little confusing, but it is not too difficult to get a list of WorkSheet names for an existing Excel File. Here is a Snippet in LabVIEW 2019 which can easily be "hand-coded" in any other version of LabVIEW (which will give you a chance to see what/how each of the Excel Functions work to provide these Sheet names).
Start with a Control (or a Path Constant) that "points to" an existing Excel WorkBook, with multiple WorkSheets (or even just a single WorkSheet). The first function, above, is "Create Report", which, here, is a bit of a misnomer -- you are not "creating" a Report, but you are, in effect, reading an existing WorkBook. [This is the "Template" input, the notion being you have a "template" and you use the "RGT" to "fill in the Blanks"].
"Create Report" will now open the Excel WorkBook you specified in "Excel Path". The next function is "Excel WorkBook Properties", and one of its outputs is "WorkSheet Count", which we wire to a For Loop Count. Inside the Loop, the Loop Index is wired to "Excel Get WorkSheet" (which "brings up" WorkSheet 0, then 1, then 2 ...), and we (again) use "Excel WorkBook Properties" to return the "Current WorkSheet Name". For this exercise, I closed Excel with "Dispose Report" and output the array of WorkSheet names.
Bob Schor
05-11-2023 01:44 PM
You can also use my 'Read XLSX File' VI to get the sheet names. No ActiveX required.
https://forums.ni.com/t5/LabVIEW/Darren-s-Occasional-Nugget-09-26-2022/m-p/4257604