LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SAVING TO EXCEL

good evening all, i need your help. 

i am saving 5 readings to an excel file in a time gap of 5 minutes. in the same filehow  to save another reading to the 6th coloumn in a new row only when i pressed a button.

please help me

0 Kudos
Message 1 of 5
(3,078 Views)

Are you SAVING TO EXCEL (which, to me, means that you are writing an Excel .xls or .xlsx file, as opposed to a comma-separated-value text file, .csv)?  If so, and if you have the Report Generation Toolkit available to you (as you provided no code, I can't "guess" whether or not this is so), there are numerous examples, both in LabVIEW, in the forums, and on the Web, discussing how to do this.  If you search the Forums for the words "Revised Example", this might get you started.

 

Bob Schor

0 Kudos
Message 2 of 5
(3,050 Views)

yes, i'm writing an excel .xls file

0 Kudos
Message 3 of 5
(3,023 Views)
Read the help of Write to Spreadsheet, Apend to file input in specific: http://zone.ni.com/reference/en-XX/help/371361J-01/glang/write_to_spreadsheet_file/
Thanks
uday
0 Kudos
Message 4 of 5
(3,019 Views)

@Krishna_kp wrote:

yes, i'm writing an excel .xls file


The "Revised Generate Excel Report Example" I tried to point you to in my previous response shows how to Generate an Excel Report using the Report Generation Toolkit, but starting "from scratch".  However, if you want to append to the end of an existing Excel WorkSheet, the process is not that difficult.

 

There are two parts to doing this, neither especially well-documented.  The first is to specify the existing Excel WorkBook File (.xls or .xlsx) as the "Template" input to the New Report function.  When you do this, it will (by default) open to the first WorkSheet in your Report ("Sheet 1" if you didn't name your sheets), and will be in Cell A1.  If you now start saving, you will (probably) overwrite data that are already present, which you probably do not want to do.

 

In most cases, your WorkSheet is filled by rows of data.  There is a function on the Report, Excel Specific, Excel General palette called Excel Get Last Row -- I think (but you can, and should, do a simple test to verify this) this gives you the Last Row with data present, so you want to start appending with the next row.  Look at the Revised Example, Step 10, to see how to Move down 1 row.

 

Bob Schor

0 Kudos
Message 5 of 5
(3,010 Views)