Google Sheets – Fix ‘Spreadsheet Too Large’ Error

google sheets

I have an XLSX spreadsheet. It has 68251 rows and 94637 cells, and it's on-disk size is 1510842 bytes. When I try to upload it, Google claims that it exceeds the 400,000 cell limit.

The cell count here is the number of non-empty cells. The spreadsheet is created with Apache POI by a Java program. Some of the rows just have a sentence (of Korean) in the first column.

Some have a single word of Korean. Some have nothing at all, and are just there for visual whitespace.

Why does Google Sheets reject my spreadsheet?

Best Answer

Blank cells count towards the limit if they are within the range of non blank cells. The calculation is done by multiplying the number of the last row with data by the number of the last column with data

for example:

+----+---+---+---+
|    | A | B | C |
+----+---+---+---+
|  1 | x |   |   |
|  2 |   |   |   |
|  3 |   |   |   |
|  4 |   | x |   |
|  5 | x |   |   |
|  6 |   |   | x |
|  7 | x |   |   |
|  8 |   |   |   |
|  9 |   |   |   |
| 10 | x |   |   |
+----+---+---+---+

Although there are a lot of blank cells, and no more than once cell filled per row, the total cells calculation is 10 x 3 = 30

It is possible that non-visible characters are present in your spreadsheet (especially as your sheet was generated rather than manually created).

In a case such as the one below (if there is a space in the cell D4), there is no visual indicator of the final row.

+---+---+---+---+---+
|   | A | B | C | D |
+---+---+---+---+---+
| 1 | x |   |   |   |
| 2 | x |   |   |   |
| 3 |   | x |   |   |
| 4 |   |   |   |   |
+---+---+---+---+---+

To find out for sure what your 'end' cell is, put the focus on A1, then use Ctrl+Shift+End and the focus will move to the cell that is in the final row and the final column.

To remove any unwanted cells, select the first unwanted column, press Ctrl+Shift+Right arrow, then right-click and choose delete. Do a similar procedure to delete unwanted rows.