11-29-2012 08:18 AM
Hello everyone.
I use a write to spreadsheet file to export my array to excel (csv format), but it rounds the numbers to the nearest integer.
How can i solve that problem ?
My VI is uploadet
Thanks in advance
Oesen
Solved! Go to Solution.
11-29-2012 08:21 AM
Isn't it a problem with how your Excel cells are configured?
11-29-2012 08:29 AM - edited 11-29-2012 08:30 AM
well.. It can possibly be that. Do you know how to configure the cells to get rid of integers ?
11-29-2012 08:31 AM
Look at the resulting file in a text editor (like notepad). If the numbers look good there, then you know it is how Excel is formatting the cells.
11-29-2012 08:35 AM
11-29-2012 08:39 AM
I have exported the data to a .txt file, and it still shows integers
11-29-2012 08:43 AM
@Oesen wrote:
I have exported the data to a .txt file, and it still shows integers
Exported how? Export from Excel? Or just open your CSV file with a text editor?
The export from Excel will just give you the same mess that you see in the cells. Open the CSV file directly in a text editor.
11-29-2012 08:44 AM
@GerdW wrote:
Hi Oesen,
I think the problem is the different decimal separator used in LabVIEW vs Excel...
Use a format string like "%.;%f" when creating the csv file!
GerdW,
If you look at the code, you will see that the format is "%.;%.2f".
11-29-2012 08:47 AM
11-29-2012 08:50 AM
Thanks for the answers
I opened my (Mappe 1.csv) file and saved it as a(Mappe 1.txt) file. After that, i changed my file path in the "write to spreadsheet file" box from (Mappe 1.csv) to (Mappe 1.txt), and tested it.