09-14-2010 07:42 AM
I have this program but i am unable to do 2 things with it. 1) i am unable to get it to start putting the data into the excel template at the same location everytime and 2) i also would like it to save the excel sheet under a new name instead of always having to go in and delete what is in the excel file.
09-14-2010 08:34 AM
I don't have LabVIEW 2009 installed on this machine so I can't open your code. If you are using the "Report Generation Toolkit" (an add-on unless you have the Professional Development package) there are some "tools" to do what you need. There is one to open a new worksheet, which would allow you to not overwrite the previously entered data, and there are vi's to allow you to select the cell to start your insert, allowing you to write to anywhere in a sheet. You do have to keep track of where you wrote, I'm doing it in a "Functional Global" or "Action Engine" (searchs on these terms will bring up a number of threads and a very informative "nugget" from Ben). In the LabVIEW Help:Examples:"Excel" there are examples using the activeX calls, am pretty sure that the functionality is present, but I haven't used those is quite a while.

09-14-2010 09:10 AM
09-14-2010 09:18 AM
@Leprechaun wrote:
I have this program but i am unable to do 2 things with it. 1) i am unable to get it to start putting the data into the excel template at the same location everytime and
This is not clear. Where, exactly, is it putting the data, and why is it in the wrong place? You are using Easy Excel Table, and have iteration hard-wired to 10, but the whole code is in a loop. Why 10?
2) i also would like it to save the excel sheet under a new name instead of always having to go in and delete what is in the excel file.
You are using "Rename Worksheet". That just renames the current worksheet. This is described in the LabVIEW Help for that VI. If you want to create a new sheet then you need to use the Excel Add Worksheet VI in the Report Generation -> Excel Specific -> Excel General palette.
Other comments:
09-14-2010 09:39 AM
I am trying to make it start at A2 everytime but it keeps adding on to the end of the list instead of starting at A2 everytime
09-14-2010 10:25 AM
@Leprechaun wrote:
I am trying to make it start at A2 everytime but it keeps adding on to the end of the list instead of starting at A2 everytime
I would suggest you create a test VI so you can get the report generation to work properly based on what you want and then you can place the code in your main VI. For example, the following code will add 5 sheets, writing the table to dummy data to each sheet at A2 on each sheet: