Go Down

Topic: Sending data from Arduino to Excel (Read 850 times) previous topic - next topic

Senso

Goodnight dear friends.
After reading a bit about how to log some data and create a graphic using Excel, it should be easy, just send the data separated by commas, I'm doing just that, saving the data in a .csv file but then Excel opens the file and keeps all the data in only one collum and not two as it should.
Let me show you, I'm sending this:
Code: [Select]
1,0
2,1575
3,1640
4,1270
5,2099
6,1806
7,1563
8,1897
9,1868
10,2108
11,1612
12,1860
13,1787
14,1871
15,1757
16,2087
17,997
18,2185
19,1461
20,2233
21,2323
22,2275
23,1904
24,1311
25,1712
26,1791
27,1893
28,1771
29,1560
30,2006


And Excell puts the two values together in the same collum, it does put each line in a separate line, but it doesnt slip for example the 30,2006 to A20 and B30 as it should, any help?

robtillaart

That might be caused by your local settings like currency separator in Excel, (have similar problems with openoffice and Dutch settings)

Let the Arduino use ; as separator and try again,
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Senso

Thanks!
Thats it, data is now in a two columns!

jim_hahn

How do you get the data into a .csv file?

robtillaart

Let the Arduino write to serial like

Serial.print( i );
Serial.print( ";" );
Serial.println( j );

ANd on the PC side use a terminal program like putty.exe. putty can capture all the output in a logfile that can be named with some vars in it:

\your\favorite\path\ &Y&M&D&T&H.csv    &Y = YEAR  &M = MONTH  &D = DAY   &T = TIME   &H = HOSTNAME

Hopes this helpes,
Rob
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up