Is there any Arduino library to read and send excel file via UART

Thread Starter

rayyanalvi

Joined Jul 23, 2022
4
I have watched many tutorials and read a lot of blogs but couldn't find any solution. Does anyone know how I can "send and read an excel file from Esp8266 to Esp8266 via UART? Thanks
 

Papabravo

Joined Feb 24, 2006
21,159
I have watched many tutorials and read a lot of blogs but couldn't find any solution. Does anyone know how I can "send and read an excel file from Esp8266 to Esp8266 via UART? Thanks
"Excel file" could mean a wide variety of things. Ultimately any file is just a stream of bytes and should offer no impediments to byte by byte transfer. Why do you think there might be a problem?
 

Ian0

Joined Aug 7, 2020
9,671
If what you mean is that you would like to send a whole load of data that can be loaded into Excel, then send it as a .csv file - that’s easy!
 

BobTPH

Joined Jun 5, 2013
8,813
That would not be a single call. You would use a loop that reads from a file and writes to s uart. Both would need some setup before the loop.
 

Ian0

Joined Aug 7, 2020
9,671
thanks, is there any library for that?
I don’t know - I don’t use software libraries, I write my own software.
but .csv data is easy to deal with.
you just send all the values from the first row, with a comma between them. Then a carriage return and/or a line feed, depending on whether you would like to be most compatible with windows or Mac.
Then send all the data for the second row the same way.
Just make sure that none Of the data contains a comma, otherwise it gets messed up.
 

Ya’akov

Joined Jan 27, 2019
9,070
It would help if you'd explain why you want to do this. It is a very unusual thing to do and it is hard to come up with a scenario that would require it.

What problem is this going to solve?
 

RayB

Joined Apr 3, 2011
31
I have watched many tutorials and read a lot of blogs but couldn't find any solution. Does anyone know how I can "send and read an excel file from Esp8266 to Esp8266 via UART? Thanks
You can send any Excel (size restricted) file as a binary file from ESP to ESP over serial. To actually do something with the file means you need to decode the file format:
7 Differences Between XLS and XLSX & 3 Ways to Convert Between (minitool.com)

To create an excel format that can be imported into Excel it is necessary only to manipulate the Serial.print() statements to mimic system-data-format mentioned earlier as .csv format.
 

bidrohini

Joined Jul 29, 2022
190
You can store Arduino's serial output in a .csv file and export that to excel. But I don't know of any method of transferring the file via USART to any other device.
 

BobaMosfet

Joined Jul 1, 2009
2,110
I have watched many tutorials and read a lot of blogs but couldn't find any solution. Does anyone know how I can "send and read an excel file from Esp8266 to Esp8266 via UART? Thanks
The file is just binary. It can be sent by a variety of methods in the format. If you want to open and read the values in the spreadsheet, that's a different question because you would need to know the file format- and Microsoft hasn't published file formats for their files types in a number of decades (used to be everywhere).
 

Ya’akov

Joined Jan 27, 2019
9,070
The file is just binary. It can be sent by a variety of methods in the format. If you want to open and read the values in the spreadsheet, that's a different question because you would need to know the file format- and Microsoft hasn't published file formats for their files types in a number of decades (used to be everywhere).
I am not sure what you are referring to, but the Office file formats have open documentation. For example, the XLS format. These docs are updated as version changes are made.
 

djsfantasi

Joined Apr 11, 2010
9,156
How did the Excel file get on the first ESP8266 in the first place? I don’t know if any version of Excel that runs on an ESP8266…

It then becomes a simple process of sending a binary file across a serial connection. I’m absolutely certain that you can find code to do that. Just as I am certain your won’t find a library…
 

ag-123

Joined Apr 28, 2017
276
simply use Serial.print() to print your data in csv format, then over the serial terminal spool it into a file and open it in MS Excel
 

Ya’akov

Joined Jan 27, 2019
9,070
How did the Excel file get on the first ESP8266 in the first place? I don’t know if any version of Excel that runs on an ESP8266…

It then becomes a simple process of sending a binary file across a serial connection. I’m absolutely certain that you can find code to do that. Just as I am certain your won’t find a library…
Hey, @djsfantasi don’t forget X-Modem! I didn’t know if it was going to be X-Modem, X-Modem, or Kermit but I knew there would be at least one of those as an Arduino library.
 
Top