Pages: [1]   Go Down
Author Topic: Sending data from Arduino to Excel  (Read 699 times)
0 Members and 1 Guest are viewing this topic.
Portugal
Offline Offline
God Member
*****
Karma: 5
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12465
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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,
Logged

Rob Tillaart

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

Portugal
Offline Offline
God Member
*****
Karma: 5
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Arizona USA
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Retired 35 years as programmer/engineer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12465
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Tillaart

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

Pages: [1]   Go Up
Jump to: