Excel sheet With arduino UNO

Can i save data from arduino board as Excel sheet or used SD card to save data then put this SD card into computer to read data as Excel sheet

(deleted)

You can write the data to a file on the SD as a Comma-Separated Values file. A CSV file can be read directly by Excel.

Pete

el_supremo:
You can write the data to a file on the SD as a Comma-Separated Values file. A CSV file can be read directly by Excel.

Pete

can yo help me with some details because i don't dealing with this before :slight_smile:

MostafaHamdy:
can yo help me with some details because i don't dealing with this before :slight_smile:

Which part are you having trouble with?

Do you have an SD card?
Can you write a text file to it?
Can you google "comma separated variable"?

PeterH:
Which part are you having trouble with?

Do you have an SD card?
Can you write a text file to it?
Can you google "comma separated variable"?

write text file to SD card

I haven't been able to test this code but it does at least compile. It should create the file test.csv on an SD card, write three lines of data to the file and then close it. If it works, you can then just put the SD card in a PC and double-click on the file which should open the file in Excel.

Pete

#include <SD.h>
File myFile;
void setup()
{
  Serial.begin(9600);
  myFile = SD.open("test.csv", O_APPEND | O_WRITE);
  if(myFile) {
    myFile.println("1,2,3");
    myFile.println("101,322,8293");
    myFile.println("7012,3964,281");
    myFile.close();
  } else {
    Serial.println("Can't open test.csv on the SD card");
  }
}

void loop(void){}

el_supremo:
I haven't been able to test this code but it does at least compile. It should create the file test.csv on an SD card, write three lines of data to the file and then close it. If it works, you can then just put the SD card in a PC and double-click on the file which should open the file in Excel.

Pete

i will try it :wink:

can i use Breakout Board for microSD Transflash (SparkFun microSD Transflash Breakout - BOB-00544 - SparkFun Electronics) to read and write on micro SD , i don't know if i need to add some component to be suitable to use it with SD Library in arduino-UNO and which pin i will connect to use it as SD card Shield

how i connect Breakout Board for microSD Transflash (SparkFun microSD Transflash Breakout - BOB-00544 - SparkFun Electronics)
with arduino uno

That one is not directly compatible with UNO because the UNO uses 5V and micro-SD cards use 3.3V. You would have to do a level conversion to make them compatible.
I use the Adafruit board which is a bit more expensive but handles the conversion.

They are easy to wire up. They will use pins 10,11,12 and 13 on the UNO. And note that the SPI hardware requires Pin 13 which means it can't be used for the LED indicator.

Pete

el_supremo:
That one is not directly compatible with UNO because the UNO uses 5V and micro-SD cards use 3.3V. You would have to do a level conversion to make them compatible.
I use the Adafruit board which is a bit more expensive but handles the conversion.
MicroSD card breakout board+ : ID 254 : $7.50 : Adafruit Industries, Unique & fun DIY electronics and kits

They are easy to wire up. They will use pins 10,11,12 and 13 on the UNO. And note that the SPI hardware requires Pin 13 which means it can't be used for the LED indicator.

Pete

i try to find it in electronic stores in my country but i can't get it and it will take long time for shipping so can i add component or any thing to Breakout Board for microSD Transflash to make it compatible with UNO board
Thanks for answer :slight_smile:

These:

will probably be what you need to use the board you have.

You seriously are better off using SparkFun microSD Shield - DEV-12761 - SparkFun Electronics though.

I use it extensively to log to a multiple csv files.

finally i used Breakout Board for microSD Transflash i connect
pin 13 to SCK
pin 12 to Do
pin 11 to DI
pin 4 to CS
CD is not connected
and it work good but i want to know is it safe method ?

ahref:
These:
https://www.sparkfun.com/products/8745

will probably be what you need to use the board you have.

You seriously are better off using SparkFun microSD Shield - DEV-12761 - SparkFun Electronics though.

I use it extensively to log to a multiple csv files.

And for just $5 more a microSC + real time clock shield which is almost always a need anyway for data logging.

Lefty

retrolefty:
And for just $5 more a microSC + real time clock shield which is almost always a need anyway for data logging.

Adafruit Assembled Data Logging shield for Arduino : ID 1141 : $13.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Lefty

can i use this shield to add date and time even if the power off

MostafaHamdy:

retrolefty:
And for just $5 more a microSC + real time clock shield which is almost always a need anyway for data logging.

Adafruit Assembled Data Logging shield for Arduino : ID 1141 : $13.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Lefty

can i use this shield to add date and time even if the power off

The realtime clock on that board does utilize a battery to keep time/data avalible even when the system is powered off, so yes.

Lefty

thanks for this information :slight_smile:

#include <SD.h>
int variable1 ;
int variable2;
File myFile;
void setup()
{
  Serial.begin(9600);
  myFile = SD.open("test.csv", FILE_WRIITE);
  if(myFile) {
    myFile.print(variable1);
    myFile.println(variable2);
    myFile.close();
  } else {
    Serial.println("Can't open test.csv on the SD card");
  }
}

void loop(void){}

variable1 and variable2 printed in cell A in excel sheet & i want to print variable1 in cell A and variable2 in cell B

How can i move betweeb cells in excel sheet