05-04-2017 05:32 AM
Hello everyone,
I'm facing the following problem at the moment. I want to export data from my VI to Excel. I'm using the MS Office Report VI on LabView 2015 and Office 2016. The export itself is working fine but the problem is that LabView fills in the right values but formatted as String and not as a number value.
when I click the green corner in the Excel table the popup says it's "Number safed as text" and I can convert it to a Number.
Some screenshots are attached. Has anyone had the same problem ?
Cheers
Michael
05-04-2017 07:44 AM
Since you are new to the Forums, you probably haven't seen my pleas to attach data (an Excel file, a .VI file, a zipped Folder containing a LabVIEW Project) instead of pictures (which are harder to examine, particularly if they don't show the "important parts").
Express VIs are designed for Quick and Simple (and, often, very limited) things, such as quickly "getting data into Excel" without any thought or control of the data. LabVIEW's Report Generation Toolkit provides fairly easy access to Excel as either Strings or Dbls. When LabVIEW writes numeric data (as strings) to Excel using the RGT, Excel treats the data as though it was a number. There are some caveats -- some of the RGT functions use a format of %.3f (which specifies only three digits after the decimal point), but this can be either user-specified, or you can do your own formatting of the numeric data to LabVIEW string data and it will appear as you specify in Excel.
There are numerous examples of using the RGT. If you search here on the Forums for "Revised Example", you'll find one ...
Bob Schor
05-05-2017
05:06 AM
- last edited on
10-10-2025
10:30 AM
by
Content Cleaner
Hi Michael,
Report Generation Toolkit has a nice tutorial on creating reports in MS Excel:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x3gcCAA&l=en-US
I think you can get some inspiration there. Also LabVIEW has a built-in Example Finder (Help\Find Examples...). There are under "Toolkits and Modules" you will find a subfolder called "Report Generation for Microsoft Office". These examples are also very instructive.
Cheers,
Bart
05-05-2017 07:29 AM