From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Development Best Practices Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

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 8
(8,602 Views)
Solution
Accepted by agonzalez7393

Check this VI:excel.png

follow your dreams
Message 2 of 8
(7,785 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 8
(7,785 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 8
(7,785 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




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)


0 Kudos
Message 5 of 8
(7,785 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 8
(7,785 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 8
(7,785 Views)

Hi smiga,

i have problems to create the properity nodes, because of some reasons, but i can run the programm listed earlier. So i hoped that you can post the programm.

 

0 Kudos
Message 8 of 8
(5,144 Views)