Convert Excel to CSV for a Python or R Assignment

Many assignments hand you an Excel file but expect you to load a CSV in Python or R. Converting it takes a minute if you check three things.

Open the Excel to CSV converter

Open the Excel to CSV converter and drop the .xlsx file. Only the first sheet is read, so if your data is on another sheet, move it to the first sheet first. Old .xls files must be saved as .xlsx first.

Check the table shape. Code works best with one header row, one record per row, no merged cells and no totals row at the bottom. Remove title rows above the header and any notes below the data before you convert.

Check the values. Keep codes such as 00123 as text, and look at the date column: mixed text and real dates in one column are a common cause of loading errors. In pandas, load the result with pd.read_csv("file.csv") and look at df.dtypes. In R, use read.csv("file.csv") and str(data).

If the columns come in as text when you expected numbers, find the stray words or symbols with the Data Profiler and fix them in Data Transformation before you convert again.

Everything runs in your browser and nothing is uploaded.

Open the Excel to CSV converter

Related tool pages

  • JSON, CSV, Parquet and Excel Converter: Convert between JSON, CSV, Parquet and Excel online for free, one file or a whole folder. It runs in your browser, so nothing is uploaded.
  • JSON to CSV Converter: Convert JSON to CSV in seconds. Drop a file or paste data and download the result. Private: it runs in your browser and nothing is uploaded. Large files too.
  • CSV to JSON Converter: Convert CSV to JSON in seconds. Drop a file or paste data and download the result. Private: it runs in your browser and nothing is uploaded. Large files too.
  • CSV to Parquet Converter: Convert CSV to Parquet in seconds. Drop a file or paste data and download the result. Private: it runs in your browser and nothing is uploaded. Large files too.
  • JSON to Parquet Converter: Convert JSON to Parquet in seconds. Drop a file or paste data and download the result. Private: it runs in your browser and nothing is uploaded.
  • Parquet to CSV Converter: Convert Parquet to CSV in seconds. Drop a file or paste data and download the result. Private: it runs in your browser and nothing is uploaded. Large files too.

How to use the Excel to CSV converter: step by step

  1. Put the data on the first sheet with one header row.
  2. Open the Excel to CSV converter and drop the file.
  3. Load the CSV in Python or R and check the types.
  4. Fix stray values and convert again if needed.

When to use the Excel to CSV converter

  • Prepare an Excel file for pandas or R
  • Fix dates and codes before loading
  • Share data with a classmate
  • Avoid loading errors in an assignment

Example

Input: A Excel file with the columns id, name and age.

Output: id,name,age 1,Ada,36 2,Alan,41

Frequently asked questions

How do I convert Excel to CSV?

Drop your Excel file (or paste the data), check the options, click Convert and download the CSV result.

How big can a file be?

It depends on your device. A few hundred MB usually works.

Which conversions does the Format Converter support?

Any direction between JSON, CSV, Parquet and Excel (.xlsx), for one file or a whole folder. Nested JSON is flattened into columns such as address.city. For Excel, the first sheet is read; old .xls files are not supported.

Why did my number or date change after converting?

Types are detected from the values. Turn off "Detect types" to keep everything as text, which also keeps leading zeros in IDs and phone numbers.

Tip: Load the CSV and check the column types straight away. It catches most problems.