I am using LM35 sensor to read the data using Arduino UNO board. The temperature value what i am getting in serial monitor has to be export to Excel. I am using Arduino Excel Commander too. But my problem is instead of printing temperature values in Excel its printing as VAR1 in all instances. Can anyone help to resolve this?
float tempC;
int reading;
int tempPin = 2;
void setup()
{
analogReference(INTERNAL);
Serial.begin(9600);
}
void loop()
{
reading = analogRead(tempPin);
tempC = reading / 9.31;
Serial.println(tempC);
delay(2000);
Serial.print("XLS,VAR1,");
Serial.print("0");
Serial.print(analogRead(tempPin));
Serial.print("/n");
}
I have no experience of Excel Commander but its documentation says
// the output format to Excel is:
// XLS,CellName,Index,Value
You are outputting
109.88
XLS,VAR1,01023/n109.88
XLS,VAR1,01023/n109.88
XLS,VAR1,01023/n109.88
XLS,VAR1,01023/n109.88
XLS,VAR1,01023/n109.88
XLS,VAR1,01023/n109.88
XLS,VAR1,01023/n109.88
XLS,VAR1,01023/n109.88
etc
etc
Could that be the problem ?
It's easier to format it for .scv
It's just comma delimited. You can open it with excel.
*.csv 
I also find this to be easy and quick to set up, and recommend it.
Thank you for all ur suggestions. Can you please tell me how to open it in .CSV file.
Thank You. Will go through that.
Using these commands under void loop(), we can directly export our sensor data to excel.
Serial.print("XLS,ARR1,");
Serial.print(i); // only for example, put here your index
Serial.print(",");
Serial.print(Temperature); // only for example, put here your variable
Serial.print("\n");
delay(5000);
i++;