03-14-2017 06:32 AM
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
03-14-2017 07:18 AM
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
03-15-2017 03:36 AM
yes, i'm writing an excel .xls file
03-15-2017 03:49 AM
03-15-2017 09:14 AM
@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