Export data to CSV or Excel without losing decimals or dates
Exporting writes the worksheet to a file that other programs can read: a CSV file, which almost every program accepts, or an Excel workbook (.xlsx). Export makes a copy of your data for someone or something else. It does not change your worksheet or your project, and it is not the way to save your own work; that is what project files are for.
When to use it
- A colleague, a customer or a supplier asks for the data in Excel.
- A reporting system, a database or a script expects a CSV file.
- You cleaned and reorganized data in StatLab and want to keep a plain copy in a shared folder.
- You need to attach the raw data behind a result to a report or a deviation record.
How to do it in StatLab
- Choose File › Export data, then CSV file… or Excel workbook (.xlsx)….
- Choose where to save the file. It is named after the project (
line-3.csvforline-3.statlab), or Untitled if you have not saved a project. In browsers that cannot choose a folder, the file goes to Downloads. - Results confirms the export.
What goes into the file:
- The first row holds the column names. A column without a name gets its label instead, such as
C5. - CSV files follow your region, the way Excel in your region expects them: commas between values and decimal points where people write
1.5; semicolons and decimal commas where they write1,5. Text that contains the delimiter is put in quotes. The file is UTF-8 and starts with a byte-order mark, which tells Excel to read accents and symbols such as·correctly. - Dates in CSV files are written year-month-day (
2026-12-01, or2026-12-01 14:30with a time), because every program reads that form the same way. - Missing values are blank cells.
- Numbers keep their full precision. Cells show up to 12 significant digits, but export writes the stored value, up to 15 significant digits.
- Excel workbooks have one sheet called Data, with the column names in bold in a frozen first row. Numbers are real numbers and dates are real Excel dates, so they sort and calculate in Excel without conversion.
Example
A process engineer has torque readings from two stations. A fifth column, C5, counts rework attempts, but nobody gave it a name. One torque value is missing, and one note contains a comma:
| C1-D Date | C2-T Station | C3 Torque (N·m) | C4-T Note | C5 |
|---|---|---|---|---|
| 2026-11-30 | ST-4 | 12.45 | 0 | |
| 2026-11-30 | ST-5 | * | 2 | |
| 2026-12-01 14:30 | ST-4 | 12.6 | re-torqued, OK | 1 |
| 2026-12-01 | ST-5 | 12.38 | 0 |
She chooses File › Export data › CSV file…. With a browser set to a region that writes 1.5 (the United States or Mexico, for example), the file reads:
Date,Station,Torque (N·m),Note,C5
2026-11-30,ST-4,12.45,,0
2026-11-30,ST-5,,,2
2026-12-01 14:30,ST-4,12.6,"re-torqued, OK",1
2026-12-01,ST-5,12.38,,0
A colleague in Spain, whose browser writes 1,5, exports the same worksheet and gets:
Date;Station;Torque (N·m);Note;C5
2026-11-30;ST-4;12,45;;0
2026-11-30;ST-5;;;2
2026-12-01 14:30;ST-4;12,6;re-torqued, OK;1
2026-12-01;ST-5;12,38;;0
Each file is written the way Excel set to that region expects to read it. Notice three things: the missing torque is an empty cell (two delimiters in a row), the unnamed column is headed C5, and the note with a comma is quoted only in the comma-separated file, where the comma would otherwise split it.
If she exports to Excel instead, the workbook has the same five columns on a sheet called Data, with the header in bold and frozen, the dates as Excel dates and the torque as numbers.
How to read the results
- Open the file once before you send it. Check that columns are separated, decimals are right and dates are dates.
- Look at the header row. A label such as
C5means a column has no name; name it in the worksheet and export again if the recipient needs to know what it is. - Count the rows. The file has one header row plus as many rows as the longest column.
Common mistakes
- Sending a CSV to someone in another region. A file written with semicolons and decimal commas may open in one column in Excel set to decimal points, and the other way around. When the recipient is in another region, send the Excel workbook: it stores real numbers and has no separators to misread.
- Using CSV to keep your own work. CSV loses column types: lot codes such as
0012come back as numbers, and text columns of numbers turn numeric on import. Save a project file for yourself. - Expecting zeros where values are missing. Missing values export as blank cells. That is correct: a blank is not a zero, and a program that treats it as zero would bias any average.
- Rounding before exporting. You do not need to round for the file to look tidy, and rounding throws away precision others may need. If a report needs fewer decimals, round in the report.
Frequently asked questions
Does exporting change my worksheet or project?
No. Export writes a copy. The worksheet, the project name and the unsaved-changes dot stay as they were.
Why does my CSV use semicolons?
Your browser's region writes decimals with a comma, so StatLab writes the CSV the way Excel in that region expects it: semicolons between values and decimal commas. To get commas and decimal points, change your browser's language and region, or export to Excel.
Can I export only some columns or rows?
Export writes the whole worksheet. Save your project, remove what you do not need (for example with Subset worksheet or Data › Delete columns), export, and then undo or reopen the project.
What happens if the worksheet is empty?
Nothing is written, and Results says there is nothing to export.