04-07-2026 06:17 PM
Hello,
I'm writing a program that's going to be running a test, and outputting the results of said test to a .lvm file.
The data I'm outputting will be a series of static string values, and dynamic data values. In a perfect world, I'd like to static string values to be organized in their own little header at the top of the file, but tbh I'd be willing to accept data in the following format as well:
|| Column 1 || column 2 || column 3 || column 4 || column 5 || column 6 || column 7 || column 8 || column 9 || column 10 || ...
|| string || string || string || string || string || boolean || boolean || 1-d scalar || 1-d scalar || 1-d scalar || ...
Now I can easily set write the boolean and 1-d scalar functions to the file using functions such as "Convert to dynamic data", "Set Dynamic Data Attributes", "Merge-Signals", and "Write to Measurement File", , but am having trouble doing the same thing with the strings. Obviously, since the strings are static, I can't just convert them into dynamic data types like the other values. And while I've seen other examples on the forums, they've all involved other Write-to-file methods that I'm not as familiar with, and I'm worried that I might accidentally split the string and data values into separate values by mistake. If anyone could recommend some good resources for me to brush up on this (whether they be other forums or specific tutorials), I'd really appreciate it.
Really my goal is just to have one spread-sheet file that I can open in excel, that will have all the data I want nicely organized on a single page.
04-08-2026 01:47 AM
Hi nim,
@nim87 wrote:
I'm writing a program that's going to be running a test, and outputting the results of said test to a .lvm file.
Really my goal is just to have one spread-sheet file that I can open in excel, that will have all the data I want nicely organized on a single page.
So you write to a lvm file even though you need a spreadsheet file?
Why don't you create a CSV file instead?
@nim87 wrote:
The data I'm outputting will be a series of static string values, and dynamic data values. In a perfect world, I'd like to static string values to be organized in their own little header at the top of the file, but tbh I'd be willing to accept data in the following format as well:
…
Now I can easily set write the boolean and 1-d scalar functions to the file using functions such as "Convert to dynamic data", "Set Dynamic Data Attributes", "Merge-Signals", and "Write to Measurement File", , but am having trouble doing the same thing with the strings. Obviously, since the strings are static, I can't just convert them into dynamic data types like the other values.
You found the problem: dynamic data CANNOT handle strings (as values).
Why you want to handle strings then you need to handle them WITHOUT using DDT or ExpressVIs…
To solve your problem I recommend:
In the end I guess you will not use the LVM format anymore…
04-08-2026 02:48 PM - edited 04-08-2026 02:49 PM
Hi GerdW,
I see, I never realized that the ExpressVI's themselves were really that limited. That's super frustrating, as so many online tutorials and guides utilize them so casually when they're not that scalable to larger projects.
Getting back on track, though. Majority of my strings only need to appear once, as they mostly represent info like the Operator using the program, the S/N for the machine being tested, and the date at the start of the test. So, might be able to get away with just including them as headers that only appear once (at least that way I won't have to re-write the entire write-to-file portion of the code so close to my deadline). Will probably circle back on learning the correct way to write-to-files once I'm in less of a time crunch.
And yeah, probably won't be using the LVM format. Only reason I was really relying on it was cause it seemed to produce data that could be read in Excel somehow better than the actual "Excel Sheet" option on the VI. My fault for not playing around more with available options earlier.
04-08-2026 02:56 PM
The LabVIEW Function "Write Delimited Spreadsheet" will create a .CSV file (which will have an Icon that makes you think it is an Excel file, but that's just Micro$oft's way of confusing you). If you look at the resulting file with a text editor that shows tabs (as, say, "<HT>") and CR/LF as "<CR><LF>", you can convince yourself that "What You See is Almost What You Want". The <HT> will be the "string separators", and "CR/LF" will be the line separators (so LabVIEW, or NotePad, will see the "lines" properly spaced. However, the Columns might not line up as you'd expect, because the <HT> skips 1..8 spaces so the next number is in position that is 1(mod 😎 (i.e. in space 9, or 17, or 25, depending on how long the preceding entry was).
What do you really want to do? Note that (generally) text strings ("human-readable" format) are not always a good choice, especially when you are dealing with (lots of) numerical data. If you are writing a "human-readable" file (like, for example, Configuration settings for an experiment done on <Date>, <Time>), then text might make sense (but you'll probably also want these settings as part of the "machine-readable" data file.
Bob Schor
04-09-2026 03:29 AM
@Bob_Schor wrote:
The LabVIEW Function "Write Delimited Spreadsheet" will create a .CSV file (which will have an Icon that makes you think it is an Excel file, but that's just Micro$oft's way of confusing you).
To be fair, the Excel icon only means "Opens in excel", if you rebind it to e.g. Notepad++ it'll change. 🙂
04-11-2026 04:32 PM
@Yamaeda wrote:
@Bob_Schor wrote:
The LabVIEW Function "Write Delimited Spreadsheet" will create a .CSV file (which will have an Icon that makes you think it is an Excel file, but that's just Micro$oft's way of confusing you).
To be fair, the Excel icon only means "Opens in excel", if you rebind it to e.g. Notepad++ it'll change. 🙂
Thanks -- I didn't know that. My apologies for Micro$oft for my attributing this "bad behavior" to them.
Bob Schor
04-13-2026 11:22 AM - edited 04-13-2026 11:23 AM
@nim87 wrote:
Hi GerdW,
I see, I never realized that the ExpressVI's themselves were really that limited. That's super frustrating, as so many online tutorials and guides utilize them so casually when they're not that scalable to larger projects.
IMHO: Express Vi's were only intended for those LabVIEW seminars sales pitches to show managers and other non-programmers who make purchasing decisions how fast you can just throw something together with LabVIEW.