Skip to main content
← All guides

5 min read

Excel's XML export is limited to 65,536 rows: what to do

By Quentin Delepierre, Salesforce Commerce Cloud consultant

You exported XML from Excel and it holds far fewer records than your table. It isn't a fault: the XML export of XML maps has a limit that Microsoft documents. Here is what it says, what you can do in Excel, and the route that skips the export.

Got your own XML? Drop it in and see it as a table, free and with no account. For an Excel file you can edit and then rebuild into an XML that keeps its structure, a free account is all you need.

Transform a file

Simple Excel table, free with no account, for files up to 1 MB. File that rebuilds into XML: free account, 3 free credits, no credit card.

Download an example result (.xlsx)Example source XML

Is Excel's XML export limited to 65,536 rows?

Yes. Microsoft states that Excel's XML export, the one that uses XML maps, saves at most 65,536 rows. Beyond that, Excel only exports the first rows, and their number is the remainder of the row count divided by 65,537: out of 70,000 rows, fewer than 4,500 make it into the XML. The resulting XML is therefore incomplete.

How many rows end up in the XML?

The rule is the one on Microsoft's page: the row count modulo 65,537. These figures are calculated with it, not measured in Excel:

  • 65,536 rows or fewer: every row goes into the XML.
  • 70,000 rows: 70,000 modulo 65,537 gives 4,463 rows (Microsoft's page writes 4,464 for this example, one row off).
  • 100,000 rows: 100,000 modulo 65,537 gives 34,463 rows.

How can you export more than 65,536 rows from Excel?

Microsoft gives three recommendations, then a procedure to export in two passes:

  • Use the xlsx format instead. That only works if the system that will receive the file accepts xlsx, which is rarely the case when it expects XML.
  • Save the file as "XML Spreadsheet 2003" (.xml). Microsoft says the mappings are lost.
  • Delete all the rows after row 65,536, then export again. The mappings are kept, but the data at the end of the file is lost.
  • Export in two passes: remove one part of the sheet and export, close without saving and reopen the workbook, remove the other part and export again. Keep each part at 65,536 rows or fewer. You end up with two XML files that Microsoft suggests combining; each has its own root, so you will have to merge them into one valid XML file, by hand or with a script.

How do you check that your XML export isn't truncated?

Microsoft's page on exporting mentions no warning when rows are left out. So compare for yourself:

  1. Note the number of rows in your XML table in Excel, without the header row.
  2. Open the exported XML in a text editor and count the occurrences of the element that repeats for each record (the editor's search function often shows the number of matches).
  3. If the XML has fewer and your table is over 65,536 rows, this is the limit. Otherwise the cause lies elsewhere: see Excel's other export messages, linked below.

How do you edit a big XML file without going through Excel's export?

ExcelifyXML doesn't fix Excel's export: it offers another route, with no XML map and no export. You start from the original XML, you get an Excel table, you edit it, then the Rebuild page rewrites the original XML, with its structure. The 65,536-row limit doesn't apply to that step: reconstruction accepts up to 1,000,000 rows and 100,000 columns, in a dropped file of 4.4 MB at most.

  1. Drop your XML file on the Upload page (free account: 3 credits at sign-up, then 1 free credit a week, not cumulative). The file can be up to 4 MB on the free plan, 30 MB on the Pro plan. The free preview shows the number of rows and columns of the table before any credit is used.
  2. Confirm (1 credit, refunded if it fails) and choose the Excel file (.xlsx), or the CSV in a bundle with skeleton.json.
  3. Edit the table in Excel, then save it. Your spreadsheet has its own limits: if it cut columns or values, the reconstruction stops and tells you.
  4. On the Rebuild page (free), drop the saved Excel file on its own (or the edited data.csv with its skeleton.json): you get the original XML back, with its structure.

When ExcelifyXML isn't the right answer

  • You only want to finish your export from Excel: follow Microsoft's method first, above. It costs nothing.
  • Your XML is over 30 MB, the Pro plan limit: you need to slim it down first.
  • You have no original XML, only an Excel table: the method starts from a template XML, explained in the guide on Excel to XML.
  • You want to keep Excel's Export button and its XML map: ExcelifyXML doesn't replace them.

Try it without an account, and what happens to the file

The "Free XML to Excel" page needs no account: drop an XML of 4 MB at most to see the detected row tag, the number of rows and columns of the result and its first 20 rows. Editing then regenerating the XML needs a free account.

Your file is processed in memory on European Union servers, then deleted immediately. Above 4 MB, it goes through a private, encrypted transit space for the time of the preview and the transformation, then it's wiped (at the latest one hour after the upload). No metadata is kept.

Going further

Edit your big XML without the 65,536-row limit:

Transform a file