An .xlsx file is a ZIP archive of XML parts, and this page unpacks it itself: it finds the central directory at the end of the file, inflates each part with its own DEFLATE decoder, and checks each one against its CRC-32, so a download that was cut short is reported instead of half-read. The workbook part lists the sheets in order and marks the hidden ones. A worksheet part lists only the cells that hold something, each with its reference, so gaps cost nothing and the table starts at the first cell with a value. Text usually lives in a shared string table the cells point into, and rich text is joined back into its plain words. A formula cell carries the result Excel saved when it last calculated, and that result is what you get — so a file written by a program that never calculates, such as Python’s openpyxl, has formulas with no value at all, and the converter says so rather than guessing.
Dates are the hard part, because an .xlsx has no date type. A date is a number, the days since 1 January 1900, shown through a date number format, so each cell’s style is followed to its format code: built-in formats 14 to 22 and 45 to 47 are dates and times, and a custom code is one when it has d, m, y, h or s outside quoted text and brackets. The count has a famous flaw. Lotus 1-2-3 treated 1900 as a leap year, Excel kept serial 60 as 29 February 1900 for compatibility, and every serial after it is one more than the real number of days. Workbooks from older Mac Excel count from 1904 instead, marked by a flag in the workbook, and both systems are handled. ISO output is 2026-09-29 for a date, 2026-09-29T13:45:00 for a date and time, 13:45:00 for a time of day and 36:00:00 for elapsed time; the serial numbers, or the text Excel displays, are the alternatives.
With the first row as keys, each later row becomes an object, written in column order: a JavaScript object would move a key such as 2024 in front of the others, so the JSON text is built directly. A blank header takes its column letter, a repeated one gets a suffix, and wholly empty rows are skipped. Numbers are written to the 15 significant digits Excel keeps and shows, so a calculated 0.30000000000000004 arrives as 0.3. A merged range holds its value in the top-left cell only; Fill merged cells copies it across. Legacy .xls, .xlsb, .ods and password-protected workbooks are recognised from their bytes and refused with a message naming what they are.