From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Tom_Hawkins

Native read/write of Excel files (.xls and .csv)

Status: New

Like it or loathe it, Microsoft Excel is heavily used for storing, recording and analysing lots of data and many LabVIEW programmers must find they need to get data into or out of Excel. However LabVIEW lacks the ability to read and write Excel files directly. It is possible to exchange data with Excel via ActiveX automation, but this:

 

  • requires Excel to be installed on the same computer as the LabVIEW application
  • is not cross platform
  • is complicated to do
  • does not appear to work reliably across different versions of Excel

 

The Report Generation Toolkit allows creation of Excel files but this costs extra and is not cross platform. 

 

Many software packages can read data directly from Excel .xls files (e.g. Umetrics SIMCA-P) and presumably it is therefore also straightforward to write data out in Excel .xls format. Native LabVIEW functions for reading and writing .xls files - for example, into string arrays - would be very useful. It would not be necessary to support formatting, charts etc - although some kind of basic formatting support might be useful.

 

Of course it is possible to exchange data with Excel via delimited files (comma- or tab-separated values) but the .csv format requires characters such as quote marks, commas and carriage returns in a string to be escaped so that they are not incorrectly interpreted as part of the file structure. Tab-separated files suffer less from this problem but on Windows at least, files with a .tsv extension are not automatically associated with Excel whereas .csv files are. It would be helpful if LabVIEW also had native functions for reading and writing .csv files with correct escaping for Excel.

19 Comments
Jervin Justin
NI Employee (retired)

Hi tmh,

 

We just launched a new branch of the NI Idea Exchange to foster ideas for LabVIEW Add-ons. The intent was to create a place for LabVIEW Add-on developers (both NI R&D and developers in the community) to find ideas that matter to the community.

 

This is part of our ongoing effort to enable LabVIEW developers to productize LabVIEW code. Some of the other things we’ve done this year were adding Licensing & Activation for 3rd Parties, launching the Compatible with LabVIEW Program and the LabVIEW Tools Network.

 

We’ve identified your particular idea as one that could potentially be made into an Add-on and would like to move it to this new Idea Exchange so that Add-on developers can easily find it. Would this be okay with you?

 

Thanks!

Jervin Justin
NI TestStand Product Manager
Tom_Hawkins
Member

That would be absolutely fine with me, thanks!

 

Tom

SpaceX Trip
Member

It would be great if this allowed you to utilize the sheet formatting such as highlighting/font settings/etc as cell "properties".

Darren
Proven Zealot

FYI, the Write To Measurement File Express VI has been updated in LabVIEW 2013 to be able to write to .xlsx files.

Hooovahh
Proven Zealot

The Write To Measurement File Express VI that Darren linked to is nice but needs some work to make it a cleaner and in a standard API format but I think it is a great start.

A-T-R
Member
Tom_Hawkins
Member

The Data Ahead one looks interesting, thanks, although it would be better if it could cope with .xslx as well - is that planned?

 

It says it requires the .NET framework so I assume it's Windows-only?

Peter-daq.io
Member

Hey,

Yes, our toolkit XLR8 is .NET based, thus Windows-only for the time being.

 

We plan on supporting xlsx in future releases some time later in 2014. We found that the old xls format suffices for most use cases, though.

 

BTW: XLR8 will be sold through NI in the immediate future, so you will be able to order it from the NI web site.

 

Thanks

 

Peter

CLD | Alliance Partner | Web data storage and visualization | daq.io
Peter-daq.io
Member

Hey everyone,

the XLR8 toolkit is now available from ni.com @ http://sine.ni.com/nips/cds/view/p/lang/en/nid/212056

 

Feel free to try it out - and check out our support group in the NI community to get the latest news on the toolkit.

 

Peter

 

 

CLD | Alliance Partner | Web data storage and visualization | daq.io