NativeOffice for Windows NativeOffice Mobile NativeOffice Scan NativeOffice Web ↗ Pinwheel
Premium Developers Blog Q&A Sign in Get NativeOffice
Back to all posts

How to Convert CSV to Excel (XLSX) Offline, Without Uploading

By The NativeOffice Team

To convert a CSV file to Excel offline, open the .csv in a desktop spreadsheet app such as NativeOffice Sheets, Microsoft Excel or LibreOffice Calc, check that every value landed in its own column, then use Save As and choose Excel Workbook (.xlsx). The file never leaves your computer. If everything ends up in column A, the delimiter was misread: import the file with the right separator (comma, semicolon or tab) instead of double-clicking it.

Why convert a CSV to XLSX at all?

A CSV is plain text: one row per line, values separated by commas. It cannot hold formulas, formatting, charts or more than one sheet. Saving it as .xlsx turns it into a real workbook, so you can add totals, filters and charts and send it to someone who expects an Excel file. Doing it offline matters when the CSV is a customer list, a bank export or payroll data you should not paste into an upload website.

How do I convert a CSV to Excel offline, step by step?

  1. Make a copy of the original CSV, so you can start again if a column gets mangled.
  2. Open the CSV in your spreadsheet app (File, then Open, and pick the .csv file).
  3. Check the first few rows: every value should sit in its own column, and ID numbers should still have their leading zeros.
  4. Fix any column types before saving, for example set ID and phone columns to Text.
  5. Choose File, then Save As, pick Excel Workbook (.xlsx), give it a name and save.
  6. Reopen the new .xlsx file once to confirm the columns, dates and numbers look right.

Using NativeOffice Sheets on Windows

NativeOffice Sheets opens .csv, .xlsx, .xls, .xlsb and .ods files directly and works offline once you have signed in. Open the CSV, check the columns, then save it as .xlsx. If you also need the data in code, select the range and NativeOffice can write it out as a pandas DataFrame or JSON, locally, with no upload.

Using Microsoft Excel

In Excel, use Data, then From Text/CSV rather than double-clicking the file. The preview lets you pick the delimiter and the file encoding (choose 65001: Unicode UTF-8 if names show strange characters). Click Transform Data if you need to set a column to Text, then Load, then File, Save As, Excel Workbook.

Using LibreOffice Calc

Open the CSV in LibreOffice Calc and the Text Import dialog appears. Tick the right separator, set the character set to UTF-8, and select any ID column in the preview and set its type to Text. Click OK, then File, Save As, and choose Excel 2007-365 (.xlsx).

Why does my CSV open in only one column?

Because the app guessed the wrong separator. Many European exports use semicolons, and some systems export tab-separated files with a .csv name. Excel on a computer with a comma decimal setting may also expect semicolons. The fix is to import the file and choose the separator yourself, or use Data, then Text to Columns on column A and pick the delimiter there.

How do I keep leading zeros and dates from changing?

Spreadsheet apps guess types when they open a CSV, so 00412 becomes 412 and 03-04 may turn into a date. Import the file instead of double-clicking it, and set those columns to Text before you load the data. Once the values are correct in the sheet, saving as .xlsx keeps them exactly as they are, because a workbook stores the cell type.

Can I convert many CSV files to Excel at once?

Yes, with a short Python script. With pandas and openpyxl installed, this loop converts every CSV in a folder and keeps every value as text:

import pandas as pd, glob

for f in glob.glob("*.csv"):

    pd.read_csv(f, dtype=str).to_excel(f[:-4] + ".xlsx", index=False)

It runs entirely on your computer, so nothing is uploaded.

FAQ

Can I convert CSV to Excel without Microsoft Excel?

Yes. NativeOffice Sheets and LibreOffice Calc both open CSV files and save them as .xlsx, offline and for free.

Does converting CSV to XLSX lose any data?

No, as long as the columns split correctly and ID columns are set to Text first. A CSV has no formulas or formatting to lose.

Is it safe to use an online CSV to Excel converter?

Only for data you would be happy to share. A desktop app keeps the file on your own disk, which is the safer choice for customer, financial or HR data.

Why do names show strange characters after converting?

The file is UTF-8 but was opened with a different encoding. Import it again and choose UTF-8.

Related reading: How to Convert Excel to JSON (https://nativeoffice.online/blog/convert-excel-to-json) and How to Remove Duplicates in Excel (https://nativeoffice.online/blog/remove-duplicates-in-excel).