12-19-2017 07:10 AM
Hi everyone,
I am trying to make a part of the code that is going to write a measurement file in Excel and save it on the desktop or somewhere. I would like to use "Write to measurement file" function, but the time column and names of signals aren´t right (look at the photo).
You can find a problem in "Release data" state.
Does anyone has an idea how to fix it?
Best regards!
12-19-2017 07:23 AM - edited 12-19-2017 07:24 AM
Hi vlado,
have you ever worked with Excel?
Why don't you set the column width of Column A to something like 30 chars? MAKE THE COLUMN WIDER!
You can find a problem in "Release data" state. Does anyone has an idea how to fix it?
I found "a problem" in your VI: there is NOTHING wired to the WriteMeasurementFile function!
To fix this problem you need to wire their inputs!!! 😄
12-19-2017 07:27 AM
This appears to be an elementary Excel "thing". If you ask Excel to format something that requires 20mm of space, but your column is only 17mm wide, Excel "suggests you adjust the size of the column" by filling the space with "########". Simply right-clicking the vertical border of the column will make the column Autosize and fix this problem.
Note that it is almost always an exercise in frustration for Forum readers (such as myself) who would like to help you if you attach static pictures of your problem instead of live VIs or Excel Files. I would have returned your Excel file "fixed" so you could see the difference.
Bob Schor
12-19-2017 07:40 AM
Hi guys,
i have never noticed a problem with to small column. Now i fixed it.
And the state that i called a problem, ist the one that i dont know how to connect, i tried some of solutions, but none of them gave me the signal names in each column top.
How should i do that?
12-19-2017 08:05 AM
Hi Vladimir,
i tried some of solutions, but none of them gave me the signal names in each column top.
What have you tried?
How should i do that?
A simple solution is: When an ExpressVI does not allow the settings you like to have then you should create your VI without using that ExpressVI!
Background: ExpressVIs are made for special purposes. They sometimes allow you to set certain parameters. But when you need other parameters or more versatile usage then you need to program your own solution (aka subVI)!
12-19-2017 01:41 PM - edited 12-19-2017 01:43 PM
Here is some advice...
12-19-2017 02:37 PM
I forgot to add that I prefer using the "Open File, Write to Text File, and Close File" primitives as the Open File also locks the file so if you try to open the file while LabVIEW is running Windows will throw a sharing violation and programs like Excel will offer to either open the file read only or open a copy of the file.
This allows you view the data file while your LabVIEW is still running and writing to the file.
Using the Express VI or Write Delimited Spreadsheet.vi does not lock the file, so you can open it fine while your LabVIEW program is still running but if your LabVIEW program tries to write to the file when you have it open, your LabVIEW program will crash because the file is open in another program.