Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
07-25-2018 03:53 AM
Hello,
Im new to Labview, though I have good knowledge in several coding languages. Im trying to figure a way to convert a txt file to an excel one. The text file is created by my original Labview program so Im trying to add a step where the text file gets converted to an excel. The text file is already separated with tabs (see attached files). When I open it using Microsoft Excel, It's all in order and good, but for several reasons, I need the program to create for me directly a .xslx file rather than a txt one even if it can be opened by excel correcly.
Attached to my message you'll find the text file I'm trying to convert and the VI I'm trying to use for that (You'll also find a screenshot of this VI in case of you need it)
I'm struggling with this for days and I'd really appreciate your help.
PS: ActiveX or RGT solutions are too complicated for me, and i think my case is not complicated since the txt file is easy to work with.
Thank you all !
07-25-2018 03:59 AM - edited 07-25-2018 04:01 AM
Hi haamza,
ActiveX or RGT solutions are too complicated for me, and i think my case is not complicated since the txt file is easy to work with.
Well, the answer is: to create (real) Excel files you need to remotely command Excel to create them - using RGT or ActiveX!
When you really don't want to go this way you could buy any of those toolkits available in VIPM which help you to access Excel files. I can recommend XLR8 as an easy-to-use tool…
On your VI: just because of using "XLSX" as file extension doesn't make your spreadsheet file into a real Excel file! With WriteDelimitedSpreadsheet you create CSV (or TSV) files - please name them so!
07-25-2018 04:35 AM
Thanks for your response.
Well, It's not that I dont want to give RGT or ActiveX a try or that I'm lazy, I've been already trying some stuffs for days now and It just doesnt work, I just cant figure out how it does zork and Internet topics dont seem that helpful for me. If you can give me a hint for what should I look for I'd be really thankful for you !
07-25-2018 04:42 AM
@haamza09 wrote:
Well, It's not that I dont want to give RGT or ActiveX a try or that I'm lazy, I've been already trying some stuffs for days now and It just doesnt work, I just cant figure out how it does zork and Internet topics dont seem that helpful for me. If you can give me a hint for what should I look for I'd be really thankful for you !
Well, you didn't try very hard. LabVIEW comes with Examples. The Forum comes with Examples. The Web comes with Examples.
Open the Forum. In the Search box at the top, type "Excel Example". I recommend the one that is named "Revised "Generate Excel Report" Example" (I know the author).
Bob Schor
07-25-2018 05:10 AM
Thanks you ! Im trying to find a way to figure out this using ActiveX. Even though, it still seems to me that Im taking the long way, Im surprised if in LV there's no way for reading a simple Txt file and saving it as a Excel.
07-25-2018 05:20 AM
I know the author
07-25-2018 05:41 AM
Hi haamza,
Im surprised if in LV there's no way for reading a simple Txt file and saving it as a Excel.
There is a simple way: you already know how to read the text file and there are the RGT functions to create Excel files. Once you understand how they work it becomes very easy…
07-25-2018 05:49 AM
There are several third-party toolkits like XLR8 out there that let you create xlsx files without ActiveX.
Regards, Jens
07-25-2018 07:47 AM
@Bob_Schor wrote:
@haamza09[...] I recommend the one that is named "Revised "Generate Excel Report" Example" (I know the author).
Bob Schor
07-25-2018 09:28 AM - edited 07-25-2018 09:30 AM
Why do you need LabVIEW to do this? Excel has no problem opening text files.