10-20-2021 02:33 AM
I have designed a vi to export the array to excel sheet. However, a row of data is logged in a cell only. Also, some data in the array is up to 1e-06, but the data logged in .csv is up to 1e-03 only. How can I solve these problems?
Solved! Go to Solution.
10-20-2021 03:14 AM
Hi hohi,
you create a CSV file. This is just a delimited text file, so please don't call it "Excel file"...
Two suggestions:
10-20-2021 04:00 AM
As rightly pointed out by GerdW Excel File is Different from CSV (Comma (Delimiter) Separated Value).
LabVIEW by default assigns Tab as delimiter, you need to map Comma (,) in the write to Spread Sheet Function.
Also its better to convert Data from Decimal Array to String Array and Append with Column Header's and write as String Array.
10-20-2021 11:14 AM - edited 10-20-2021 11:15 AM
@GerdW wrote:
Hi hohi,
you create a CSV file. This is just a delimited text file, so please don't call it "Excel file"...
Two suggestions:
- use the delimiter char expected by Excel for CSV data, for me this typically is a semicolon...
- use a format specifier for your numeric data as expected by Excel: is there any decimal separator mismatch (comma vs point)?
Um.. The delimiter expected in a Comma Separated Values (.csv) file is a comma.
Excel actually expects a Tab delimiter by default, and you might notice that the Tab is also the default delimiter in the Array to Spreadsheet String VI and Write Delimited Spreadsheet VI.
10-20-2021 01:12 PM
Hi RTSLVU,
@RTSLVU wrote:
Um.. The delimiter expected in a Comma Separated Values (.csv) file is a comma.
Excel actually expects a Tab delimiter by default, and you might notice that the Tab is also the default delimiter in the Array to Spreadsheet String VI and Write Delimited Spreadsheet VI.
On a German Windows with default German regional settings Excel expects semicolon as delimiter with numbers using comma as decimal separator char…
(Yes, I know what CSV means, but reality is different than expectations. When using a tab as delimiter I usually use ".txt" as file suffix for spreadsheet files, which Excel then also accepts gracefully.)