01-26-2023 09:07 AM
Hi,
Didn't use labview since a (very) long time and I'm a bit lost:
I have measurments data from an excel file and I would like to create a labview program that would allow me to extract the colums, doing a few calculations between them and at the end creating a new excel file with manipulated data.
I'm quite good at math but really a nut with coding... 😕
01-26-2023 09:53 AM
I have a first try but I'm quickly stuck
01-26-2023 10:25 AM
If you type "Revised Excel " in the Search Bar at the top of this Forum, you should find a 2014 post called Revised "Generate Excel ... " post that might give you some help.
Bob Schor
01-26-2023 10:59 AM
Thanks I'll have a look!
01-26-2023 11:32 AM
well, it helps but I'm still wondering how to acces to a whole excel column and play with it
01-26-2023 11:58 AM
@jeanbat29 wrote:
well, it helps but I'm still wondering how to acces to a whole excel column and play with it
I think this post might help.
Darren's Occasional Nugget 09/26/2022 - Page 4
01-26-2023 09:32 PM
You are correct, that Revised Generate Excel Report example doesn't treat how to open an Excel File and read from it. Sigh, I overlooked that part. It's sort of a "hidden secret" that NI has not publicized. There are some "tricks", and difficulties along the way, particularly if you want to update an existing Excel Workbook (to say nothing of a Workbook with multiple Worksheets), but I'll try to get you started.
Let's assume you have an Excel Workbook with a single Worksheet. Let's also assume that the Worksheet is a rectangular array of floats (I'm assuming no Row or Column headers, to keep it simple).
Do the regular Create Report, specifying an Excel Report. Notice the input below Report Type, namely "Template". This is where you specify the Excel Workbook that you want to read. But how do you read it? Look in the "Excel General" folder, and insert "Excel Get Data". Wire a 2D Array of Dbl to the Data Type input. The next two inputs allow you to specify the "corners" of the rectangular region of the Workbook you want to read -- if you leave them both blank, it will read the entire Workbook into and M x N array of Dbl.
Now you have your Excel data. I recommend (for now) that you close this Excel Workbook and (using a different name) Generate a Revised Excel Report using the techniques in Revised "Generate Excel Report", saving the Excel Data as processed by your LabVIEW code.
Bob Schor