From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-06-2017 12:33 PM
Dear all
I want to save no of container moves in every one hour.container are three different size like 20/40/45 feet.
I code can count no of moves.
I want to save all these data in excel sheet at any fixed time like 8am.
The excel sheet should have header showing container size and in row time duration like from 7am to 8am .
Please help me about this as I don't know about data saving
Thanks in advance
10-06-2017 12:39 PM
Experiment with the Report Generation Toolkit >>> Excel easy table.
Ben
10-06-2017 12:40 PM - edited 10-06-2017 12:42 PM
Hi Asif,
before saving "in Excel" you should start by creating a 2D string array containing:
- a header row with your header labels
- other rows containing your data
When you have achieved this part of the exercise you simply save this array using WriteToSpreadsheetFile (or with recent LabVIEW versions "WriteDelimitedSpreadsheet")!
(After (or even while) doing this you can read the help for the Write… function: it also accepts 1D arrays. This way you can separate writing the header line from writing the data lines making the file creation even easier!)
10-07-2017 11:30 AM
Asif,
The key question is "What do you mean by Excel"? You got two very different (but also "correct") suggestions -- Ben described saving the data in the .xlsx Format that is proprietary to (and uses) Microsoft's Excel software, while Gerdw described saving data as a Comma-Separated-Value (.csv) file, a pure Text file that Excel can also open (and may even "brand" as its own by creating an Excel-like Icon for this file type).
If you want to save in .xlsx format (which allows doing "Excel-like" things such as creating Excel Graphs, coloring cells, changing text formats, etc.), use the Report Generation Toolkit (if you have it). If you just need numbers (possibly with headers) in a 2-D text format, with columns separated by tabs or commas, and rows separated by New-Lines, you can Write Delimited Spreadsheet.
Bob Schor