LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert text file to excel file

Hello all,

 

I can store FFT plots as two-column text files using the VIs in the circle area attached in the image. However, I would like to convert and save these text files in .xls formats (excel files). I would appreciate if anybody could be of help in this regrad.

 

Thanks.

0 Kudos
Message 1 of 7
(8,702 Views)

use this vi for that

Message 2 of 7
(8,686 Views)

That VI DOES NOT create an Excel file.

 

It creates a text based file that just happens to have an .xls extension.

 

For actual Excel files,  use the Report Generation Toolkit or use ActiveX commands.

 

Search the forums.  <sarcasm> You question has been asked exactly one time before.  </sarcasm>

0 Kudos
Message 3 of 7
(8,668 Views)
indeed what RavensFan told is true but with that vi you can have file with .xls format
that your excel could open it and you can save it as excel file easily
otherwise you have to use active x or report generation toolkit for this reason
0 Kudos
Message 4 of 7
(8,660 Views)

@Hatef.fouladi wrote:
indeed what RavensFan told is true but with that vi you can have file with .xls format
that your excel could open it and you can save it as excel file easily
otherwise you have to use active x or report generation toolkit for this reason

This is entirely false.  You're creating a file with .txt format.  You're just naming it .xls.  This is not the same thing.  If you're going to go with this route, you may as well leave the format as .txt and open it in excel.  At that point, you can make the same choice of delimiters and convert it into an excel file.

 

It is NOT helpful to mislead someone twice, once after being called out on this.  Rather than defending the incorrect claim you've made a third time, you'd provide more help directing the original poster towards the search RavensFan sent them on.  With a very frequent post, it'll be easy to find a few threads with the actual answer to this question.

0 Kudos
Message 5 of 7
(8,654 Views)
natasftw
if I want to be frank I have to confess that you are right 🙂
and it is better that Keivan use report generation toolkit
0 Kudos
Message 6 of 7
(8,643 Views)

We always ask posters to attach their code (means the VI itself, not a picture of part of a VI).  From the VI, we can learn a lot, including what version of LabVIEW you are using.

 

If you are using LabVIEW 2014 and 2015, you have the Report Generation Toolkit, which can easily write .xls or .xlsx files with a 2D array of data points.

 

There are numerous examples of using the RGT in this Forum, as well as examples within LabVIEW itself.  It is important to realize that the text files that you can write that are "readable" by Excel are not .xls or .xlsx files, but delimited text files that Excel can read that "translate" into .xls/.xlsx files, but that's a multi-step response, while the RGT writes these .xls/.xlsx files in a single step.

 

Bob Schor

0 Kudos
Message 7 of 7
(8,632 Views)