LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to read data from excel and put in array?

Hi,
   I need to read data from excel and put the data read into the array. The excel file typically having 6 column and rows are not known. Though I find online help regarding this nothing gives me the solution. How can I do this?
 
Thanks in advance.
 
Thanks & Regards:-
Mike
0 Kudos
Message 1 of 12
(3,916 Views)
Hello Mike,

The only way that I Know using Labview it's with the Report Generation toolkit. After that it's simple and intuitive.

If you have this toolkit you should see  in the "easy text report .vi " the input "report type" with excel option. If you only have the two options "standard report" and "html" means that you do not have the toolkit installed.

http://www.ni.com/toolkits/report_gen.htm

You have all of this, the rest it's simple. I'm not currently using excel from microsoft so the toolkit don't matter to me. because it uses the activex properties and methods from microsoft office. If you don't have this office, the vi's appear with the broken arrow.

If your only question it's how to do it with microsoft and report generation installed, I can install in my PC and do you the example.
Software developer
www.mcm-electronics.com





PORTUGAL
Message 2 of 12
(3,903 Views)

Take a look at this link:

http://zone.ni.com/devzone/cda/epd/p/id/3409

I found this library interesting even if I didn't use it.

Bye

0 Kudos
Message 3 of 12
(3,898 Views)
If you are trying to read data from a spread sheet and put it into an array the easiest way is to save the spreadsheet as a .csv file, then use the read text file and spreadsheet string to array vi's as shown below.
 
 
Craig

Message Edited by craigc on 05-09-2007 04:04 AM

LabVIEW 2012
0 Kudos
Message 4 of 12
(3,899 Views)

Hi Jorge,

  Thanks for your reply.I do not have report genration tool kit. Is their any other way to do this?

   Basically I want to read the data from excel sheet to plot the graph. Graph will be having any number of column and row from the excel sheet. So I thought that if i read the excel file in array and then select column (let's say 2,4,6) and rows (let's 50 to 100) to plot the graph. Do you have any idea how to do this?

 

Thanks & Regards:-

Mike

0 Kudos
Message 5 of 12
(3,890 Views)

Hi Craigc,

  Thanks for your reply. I am storing data in the excel sheet which I will be using to plot the graph. So is their any inpact of converting file to .csv file in terms of writing data to the file.

  My second query is that I want to use data which I have collected in array to plot the graph. The user will select the column numbers and number of rows to be plottted. How I can extract data according to user input?

 

Thanks in advance:-

Mike

0 Kudos
Message 6 of 12
(3,888 Views)
Hi
Look at my attached vi as a starting point.  Point it to the csv file from the front panel and run 🙂  Then right click on the wires and add indicators (or probes) where you want to get a feel of what is going on.
Craig
LabVIEW 2012
0 Kudos
Message 7 of 12
(3,882 Views)

Hi Craigc,

  I have observed noting on the graph. I try to change to Column Index no(A),Column Index no(B) ,row start no. number of rows. But graph has not come. Will it be possible for you to provide me with sample .csv file so that I can observe the graph and do some analysis.  I am looking for positive response from you.

 

Mike.

0 Kudos
Message 8 of 12
(3,869 Views)
This seems to be a continuation of this thead.

Message Edited by smercurio_fc on 05-09-2007 09:11 AM

0 Kudos
Message 9 of 12
(3,853 Views)


@smercurio_fc wrote:
This seems to be a continuation of this thead.

Message Edited by smercurio_fc on 05-09-2007 09:11 AM



Good thing you caught.

Too bad he wasn't able to make it work given all the help he received in that other thread.

Best place for him to start is look at the Examples that ship with LabVIEW and also the example programs on
this website.
0 Kudos
Message 10 of 12
(3,849 Views)