Description
Describe the problem
It is common for Arduino sketches to output serial data to the computer in a delimiter-separated format (AKA "CSV"). This data is usually copied from the Arduino IDE Serial Monitor and then pasted into a spreadsheet program for further manipulation and analysis (e.g., generating charts).
🐛 Content copied from the Serial Monitor output field is stored in the clipboard as formatted text. This causes it to not be correctly recognized as delimiter-separated data when pasting it into a spreadsheet program.
To reproduce
- Upload a sketch to your Arduino board that produces delimiter-separated output.
ⓘ A demonstration sketch is provided here:
Content copied from Serial Monitor output is formatted text #2093 (comment) - Open the Arduino IDE Serial Monitor.
- Select the output in the Serial Monitor view.
- Open a new spreadsheet in your spreadsheet application (e.g., OpenOffice/LibreOffice Calc, Microsoft Excel)
- Paste the data from the clipboard to the spreadsheet.
🐛 The data is pasted in a single column:
Expected behavior
The format of the content copied from the Serial Monitor output field is in plain text format (i.e., CF_TEXT
).
This will allow it to be recognized as delimiter-separated data when pasted into a spreadsheet application. The application will either automatically import the data into the appropriate spreadsheet columns, or else present an import dialog.
Arduino IDE version
Operating system
Windows, Linux, macOS
Operating system version
This is universal behavior
Additional context
The fault does not occur when the Arduino IDE 1.x Serial Monitor is used.
The problem appears to be related to the Serial Monitor output being printed as HTML, which causes it to be copied to the clipboard as "HTML Format" (CF_HTML
) data. More information:
https://learn.microsoft.com/en-us/windows/win32/dataxchg/clipboard-formats
A tab character was arbitrarily chosen for the delimiter in the demo, but the fault also occurs with other delimiters (e.g., comma, semicolon, space).
Additional reports
- Content copied from Serial Monitor output is formatted text #2093 (comment)
- https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/72
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details