LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

changed .xlsx into .mat and had fast access in matlab. How to do in labview ?

Hi 

 

I developed a GUI in matlab. I converted the excel files into .mat files and used in matlab so it takes less time to perform the tasks. But now I want to implement the same task in labview. In what format do I need to save the converted excel file since reading the excel file takes a lot of time everytime I perform.

0 Kudos
Message 1 of 7
(6,100 Views)
If the excel file is clean rectangular numeric data, just save it as *.txt and you'll get a tab delimited file that "read from spreadsheet file" can read without problems. See how far you get.
0 Kudos
Message 2 of 7
(6,097 Views)

I have a lot of excel sheets nearly 5GB. so i cant change every file to .txt

0 Kudos
Message 3 of 7
(6,094 Views)

Well, the you need to be more clear.

 

I thought you changed every single file to something suitable for matlab, so why would my suggestion be any different?

0 Kudos
Message 4 of 7
(6,088 Views)

First of all I want to know if there is any specific format like the .mat in Matlab. Moreoever the excelfiles i am having have multiple sheets so they need to be saved seperately into text file inorder to access them as you said. When I am accessing with .mat format over Matlab I am able to perform the given task in 5 secs. Now I want a module as faster as that one. 

0 Kudos
Message 5 of 7
(6,083 Views)

It seems there are LabVIEW tools to read mat files. For example have a look at this, (I have not tried it, but see also here).

0 Kudos
Message 6 of 7
(6,071 Views)

If you are looking for an efficient way to store data in LabVIEW, you can use the TDMS file format. This is a file format National Instrument created to address some of the very issues you are talking about (speed, file size, etc.) You can also read TDMS files from 3rd party applications (Excel, etc.) with the free tools NI makes available online. If you want to learn more about the TDMS file format you can read the whitepaper here

 

As for the files that you already have, you can use DataPlugins in LabVIEW to read in any custom file format, regardless of how large it is or how many sheets it has.DataPlugins map any arbitrary custom file format onto the TDMS model. You can create these DataPlugins using a DIAdem wizard or program it using VBScript, C++, or LabVIEW. National Instruments offers many DataPlugins for free download from ni.com/dataplugins. You can then follow this tutorial to learn how to use the DataPlugins in LabVIEW. 

Stephanie A.
Americas Marketing Manager
National Instruments
0 Kudos
Message 7 of 7
(6,017 Views)