LabVIEW Development Best Practices Discussions

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

How to open and save a text file in Microsoft Excel throught LabView?

Solved!
Go to solution

Hi! Does anyone know a way to open and save a text file in excel through Labview? I was using Activex functions and I had success opening the file, but when I try to save it directly in excel I cannot. Below is the code  that I am using, I'm pasing the path of the text file. Thanks in advance for any help!

Untitled.png

Message 1 of 7
(3,170 Views)
Highlighted
This widget could not be displayed.
Solution
This widget could not be displayed.

Check this VI:excel.png

follow your dreams
Message 2 of 7
(2,353 Views)

Arkadiusz provides a good method of handling excel files but was is your use case?

If it is a simple text file you could use a native LV primiitves to handle that.

0 Kudos
Message 3 of 7
(2,353 Views)

This Tool from the Toolsnetwork should help:http://sine.ni.com/nips/cds/view/p/lang/en/nid/212056 - it's easy of use, do not need Excel installed on the PC and it's much faster than thrue ActiveX. It's worth every Dollar and you can try it for 30 Days.

0 Kudos
Message 4 of 7
(2,353 Views)

You can give Steve Watts' new tool for Open Document Spreadsheets a try:

https://decibel.ni.com/content/blogs/labviewramblings/2016/04/08/open-document-spreadsheet-tool


Joerg Hampel | CLA, LabVIEW Champion, DQMH Trusted Advisor | hampel-soft.com | alarchitects.org
0 Kudos
Message 5 of 7
(2,353 Views)

Hi! GPiotr, I am using Activex to grammatically open the text file (.txt) in excel. My problem is that I would like to save that file as an excel file, but for some reason I am not able to save the file directly from excel. So I am trying to find a way to convert that text file in an excel file in labview.

My project is about decoding a binary file and save de decoded information in a text file, the problem is that create a format into a text file is really difficult, so my text file is separated by tabs and when I open it in excel all the information looks good. For this reason is that I need to read and save this text file in Microsoft Excel.

0 Kudos
Message 6 of 7
(2,353 Views)

If you need to analyze the data later on in excel the method that Arkadiusz suggested if for you.

If you only need to present data I would suggest something like html file.

It does not require any third party applications except from the web browser and will work on any device.

I am not a html expert but i think that something like this should do the job:

html output example.png

0 Kudos
Message 7 of 7
(2,353 Views)