06-18-2020 03:17 AM
Good morning all,
I have a project taking several labview programs, each labview program saves an excel page, I would like to know if it is possible in a program to resemble the new page with the one from before
explanation: program 1: first and last name is displayed and saved on an excel page
program 2: height and weight displayed on an excel page
objective: combine the excel sheet of program 1 with the excel sheet of program 2 to obtain at the end a sheet an excel sheet with the data from program 1 and the data from program 2
06-18-2020 03:22 AM
Hi thib,
@thib101200 wrote:
I would like to know if it is possible in a program to resemble the new page with the one from before
Yes.
06-18-2020 03:29 AM
how can we do ?
06-18-2020 03:48 AM
06-18-2020 04:44 AM
do you have an example that i understand how to read 2 excel sheet then save the data on 1 single sheet
06-18-2020 05:04 AM
06-18-2020 08:29 AM
One of the things that GerdW mentioned is the need to distinguish between Excel data, meaning files with the extension .xls or .xlsx, and what LabVIEW calls a Delimited Spreadsheet, a text file with a character (typically a comma or a tab) separating Columns and Rows saved as separate lines of text -- such files typically have the extension .csv (for Comma-Separated Values), and if you have Microsoft Office installed, these files will have a default Icon that "looks like" Excel, even though it is a pure Text file.
Working with .csv files is easy in LabVIEW. Read Delimited Spreadsheet imports the data as 2D arrays, and Write Delimited Spreadsheet outputs it. If you have two such arrays, you can combine them any way you want and write out a single Array.
If you truly have Excel (.xlsx) files, there's a bit more work to do. The New Report function takes a "Template" input, which is essentially an "Open for Reading" (though you'll have to do a bit of work to extract the data). Once you have extracted the Data, you can combine it with other data and create a new Report, giving the Report a new Filename.
Bob Schor
06-18-2020 08:41 AM
thank you so much
my excel file is in (xls) how do I extract the data?
06-18-2020 08:48 AM
Hi thib,
@thib101200 wrote:
my excel file is in (xls) how do I extract the data?
As has been mentioned several times before: use RGT (ReportGenerationToolkit) functions to read your XLS files…
06-18-2020 09:27 AM
Extracting the data requires some work. There is an Excel Get Data function, but it really helps to know precisely the format of the Excel file you are trying to read (and/or parse).
This is something that I would not recommend to someone with less than several months of real LabVIEW experience ...
Bob Schor