Jump to content
Paul Liu

Reading from an excel spreadsheet, then having user interact with the data

Recommended Posts

Hi All,

I am a new user to LabView and this is my first project using it. The project requires me to read a massive spreadsheet from Excel into LabView and then allowing the user to do the following:

- Select which columns to plot against the first column

- Use a cursor to select a portion of the spreadsheet: the Vi will then average the selected data by column (in other words, if the user selects data across multiple columns, the program will average data in each column separately). Then write the averages to the csv file.

So far, I have the spreadsheet read into a table as strings (because the first row of the spreadsheet is words). I have spent a lot of time searching how to allow the user to select data on the table to perform operations on, but to no avail. I am hoping you guys could give me some insight on how to tackle this project.

Share this post


Link to post
Share on other sites

Why must you use LabVIEW?  This sounds like a job for Excel's VBA.

Share this post


Link to post
Share on other sites

So you don't need LabVIEW for this particular problem; that's good.  You can probably do this with LabVIEW, but it's not the best tool for the job; LabVIEW is really good for applications that interface with hardware.  Can you pick a different project to familiarize yourself with it?  Something with DAQ or instrument control?

Share this post


Link to post
Share on other sites

Some years ago it was possible from LabVIEW to interact with EXCEL with the DDE functions.

I do not know if this still works in recent versions of LabVIEW.

excel.png

Share this post


Link to post
Share on other sites

DDE has been deprecated for more than a decade. You can use the .NET API for Excel, but it will get very complicated, as you will probably have to register user events and callbacks.

 

Share this post


Link to post
Share on other sites

If you have the report generation toolkit you can open a new report with the existing file as a template. Then you can call [Excel Get Data.vi] to extract the data from the worksheet.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.