The arduino cannot write into an excel sheet.Excel software runs on a computer, not an arduino.Arduinos can send data using conventional serial protocol to other devices, including computers. As far as I know, excel has no method available to collect this data itself.You would need to write a program to run on your computer, to collect the serial data being sent bythe arduino, and then put that data into excel, or write it into a file which excel can read.
well here is two methods:(1) Write your data into a plain text file with commas between the fields, onto an SD card connected to the arduino.There are plenty of online tutorials and code examples for this. Take the SD card out of the arduino. Stick it into thecomputer. Use excel to input the data from the "CSV" format file on the SD card.(2) Learn how to use "Processing" or some other language on the PC capable of collecting data from the serial port.Send the data from the arduino to the computer, collect it with a program you have written, and save on the PCin a CSV format text file. Then read it into excel.