HOW TO CAPTURE SERIAL MONITOR AS TEXT FILE AND LINK TO EXCEL WITH AUTO REFRESH

Here is an easy way to capture the Arduino serial monitor output as a text file, link the file to Excel, and configure Excel to refresh the connection automatically without additional user intervention.

After spending many hours trying software including Gobetwino, PLX-DAQ, Processing, Arduino Excel, Putty, Coolterm and HypeTerminal, to name a few, here is an easy but flexible solution:

  1. Download Realterm, the FREE and powerful Serial Terminal software for Windows, from: http://realterm.sourceforge.net/ Realterm allows you to view the Arduino serial monitor data in real time as it is streamed, and allows you to save the data stream to a text file, with the option of adding a TimeStamp to each row of data. This feature makes it possible to use an Arduino board without any Real Time Clock shield, as long as the board is connected to your PC.
  2. Start Realterm, and go to the Port tab and select the serial port number, and the baud rate (i.e. serial connection speed). Optionally you can include a TimeStamp as the first column of each line of data that is captured to file. Also you can specify the TimeStamp as comma or space delimited. It may be convenient to use the command Serial.print(","); or Serial.print(" "); in Arduino, for delimiting your output data items that are captured by Realterm so that the TimeStamp delimiter is the same as the data delimiter.
  3. In Realterm, go to the Capture tab and select the capture file name under the File tab. When you are ready to capture the data from Arduino, click on Start. You have the option to Overwrite or Append an existing file. Note: You will not be able to capture data in Realterm if your serial monitor is open in Arduino, so make sure you close it. Also, you do not need to have the Arduino IDE running while you capture data using Realterm, if your Arduino board (such as Arduino Uno) has a bootloader to run a sketch that is stored on the board, as long as the board is connected to your serial port and the port is recognised by Windows.
  4. After the file is created and the capture data starts being written to it, start Excel, got to the the Data tab, and import your captured text file, after selecting the appropriate delimiter choice. After the file is imported, remain in the Data tab, and click on Connections>Properties. Remove the tick mark "Prompt for file name on refresh", and enable the tick mark to refresh every X minutes. The lowest value for X is 1 minute. Choose the other options as you need. Close the Connections>Properties dialog box, and save the Excel file using the .xlsx (or desired) extension.

That is all! You can learn how to do more advanced stuff with Realterm by browsing their website. Enjoy!

1 Like

Thats nice, i did this on Linux with minicom. Same principle.

One4u:
After spending many hours trying software including Gobetwino, PLX-DAQ, Processing, Arduino Excel, Putty, Coolterm and HypeTerminal, to name a few, here is an easy but flexible solution:

Hi One4u
I have been trying to run text files into arduino with not much success, I had been advised all of the above, your RealTerm option looks simple and straightforward, compare to others.
I have try to follow your instructions but I am encountering some problems.
Fisrst I upload my sketch in Arduino to my mega 2560 (if I open and connect RealTerm first I get a warning from arduino saying that my port is in use to quit any programmes)
Them I open RealTerm go to port, which already appears there and set the baud rate to 9600
I go to capture and with the status saying connected I browse the text file that I want to overwrite, when I click on start overwrite part of the screen console gets red but not chars=0 it seems that no info is been overwrite
my text file contains to sets of files of numbers that are the rotation degrees for some servos so it looks like;
00150015 (servo1 to stay 0 degrees, servo2 moves 15 servo3 stays at 0 and servo4 moves 15 degrees)
15001500 (servo1moves 15 etc)
Can you see in the pictures attached, what I am doing wrong why the text file shows no char count when I press start overwrite or start append?
Thanks

One4u:
Remove the tick mark "Prompt for file name on refresh", and enable the tick mark to refresh every X minutes................. and save the Excel file using the .xlsx (or desired) extension.

That sounds rather neat and perhaps explains why you had grief with PLX. It only works with older vertsions of Excel.

this seems really useful, but do i need to change any settings in the Display tab at all? and i basically have all the same settings in Port and Capture tab as user ignacioandcorral...
(only bytes have more zeros, but dunno if that affects anything or not...)

and it should not display anything in the black window anyway with the Direct capture option? ::slight_smile:

I already did exactly the same method of capturing and importing data from arduino into excel file using
another terminal program called Termite 3.3 by CompuPhase before. Realterm doesn't work on windows 10 64 bit. I think Realterm works only on windows 7 and older. Termite 3.3 is very simple and configuring is a breeze.

Needless to say... ESM4 Enhanced Serial Monitor - ESM4 new error reporting system - Interfacing w/ Software on the Computer - Arduino Forum will output whatever you want to a text file which can be read in by Excel in this manner.

You can write an ESM script file to do all the setting up for you and/or get the Arduino to send the appropriate messages to the ESM to do it... or a bit of both depending on your situation.