"Too many field defined." when importing a spreadsheet

When importing from an Excel file, you may receive the error "Too many fields defined." if more than 255 columns are in use.

When importing data from a spreadsheet, it's possible to receive the following error:

Cannot open spreadsheet.  Make sure the file is in the Microsoft Office Excel Workbook format, the workbook is not protected, and you have the proper file permissions to read the data.  The error was: Too many fields defined.

The Excel workbook may only have data in some columns, but there could be more than 255 columns. This sometimes happens when data has been deleted from columns, but the columns themselves remain without data. 

To fix this

  1. Open the file in Excel
  2. Select all the blank columns that you do not need.
  3. Right click the selected column headers and choose "Delete"
The above steps will remove any columns that are not needed. It may appear as if the column are still there, but the columns should be removed and replaced with null columns.