Incorrect Data Appears When Using Export Data to Excel in LabVIEW

Updated Aug 18, 2023

Reported In

Software

  • LabVIEW Full
  • LabVIEW Base

Issue Details

I have a LabVIEW VI in which I use the Export Data to Excel method to export the data on my front panel waveform chart to Microsoft Excel. When I view this data in Excel, some of the channels of data appear incorrectly. Why is this occurring and how can I avoid it?
 

Solution

If the cluster of channel data that is written to your chart indicator contains multiple data types, the exported data will be incorrect. For example, in Figure 1 below, the waveform chart contains one channel of double numeric (DBL) data and one channel of long integer (I32) data.
 

Figure 1. Mixed Data Type Chart
In this case, when the data is exported to Excel, the data for the second channel will be incorrect, as shown in Figure 2.


Figure 2. Data from Figure 1, exported to Excel
To resolve this issue, ensure that all plots in your waveform chart are the same data type. If your application requires that you write multiple data types to a file that can be opened in Excel, consider formatting the values as strings, then writing to a CSV file. An example of this method can be found in the Tab-Delimited Data.lvproj from the LabVIEW shipping examples.