LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Import excel data, manipulating data and creating an excel file

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... 😕

0 Kudos
Message 1 of 7
(833 Views)

I have a first try but I'm quickly stuck

0 Kudos
Message 2 of 7
(812 Views)

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

0 Kudos
Message 3 of 7
(790 Views)

Thanks I'll have a look!

0 Kudos
Message 4 of 7
(776 Views)

well, it helps but I'm still wondering how to acces to a whole excel column and play with it

0 Kudos
Message 5 of 7
(766 Views)

@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

0 Kudos
Message 6 of 7
(756 Views)

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

0 Kudos
Message 7 of 7
(720 Views)