05-31-2022 02:01 AM
Hello - I'm trying to write data from the DAQ Assistant to Excel in LabVIEW, and it's mostly working, but I'm running into an issue where the data exported to Excel only has 3 decimal places of information. I think there is a "%3f" setting somewhere based on other questions, but I can't seem to find it for the DAQ Assistant - does anyone know how to modify the assistant so that I can export an arbitrary number of decimal places for each data point to Excel? Thanks!
Solved! Go to Solution.
05-31-2022 03:25 AM - edited 05-31-2022 03:25 AM
Hi Zali,
unfortunately you use the latest version of LabVIEW which is not used by all of us. When you want to address a broader audience you should downconvert your VI before attaching…
@zali147 wrote:
I think there is a "%3f" setting somewhere based on other questions, but I can't seem to find it for the DAQ Assistant - does anyone know how to modify the assistant so that I can export an arbitrary number of decimal places for each data point to Excel
As far as I can see in my LabVIEW2020 version when setting up the DAQAssistent that logging in the DAQAssistent uses TDMS files. Those TDMS files don't have any "%.3f" formatting, they store the sample data in binary!
How do you open those TDMS files in Excel? Do you use the TDMSPlugin for Excel?
Did you ever tried to change the cell formatting for that signal column? (I guess the problem is just with Excel…)
Can you attach an example TDMS file created from your VI?
05-31-2022 04:17 PM
Hi GerdW,
Thanks for the reply! I'm not using TDMS logging - I just right click the graph and select the "Export Data to Excel" option like in the attached picture.
05-31-2022 04:18 PM
Also, I've attached the downconverted file - there is nothing other than a DAQAssistant module though.
05-31-2022 10:39 PM
Unfortunately for export data to excel or clipboard you don't have a way to set the number of digits of precision. You would need to adopt the logging feature or implement your own write to csv feature with proper numeric formatting.
06-01-2022 03:23 AM - edited 06-01-2022 03:26 AM
Hi zali,
@zali147 wrote:
I'm not using TDMS logging - I just right click the graph and select the "Export Data to Excel" option like in the attached picture.
Then why did you wrote about a problem with your DAQAssistent ExpressVI? You don't export data from DAQAssistent, you export the data from that graph! (That's a small, but subtle difference…)
You might try to change the Y scale formatting to show more digits before exporting the shown data to the clipboard.
The better way would be to use the TDMS logging in the DAQmx driver (or to write your own data export function implementing the formatting as required)…
06-17-2022 07:47 PM
TDMS logging solved the problem. Thank you!