Why does Excel say “we found a problem with some content”?
Because something in the package is inconsistent — and Excel will not tell you what. Drop the file below and it gets named.
Drop an .xlsx file here
or click to choose one
Nothing is uploaded. The check runs in your browser. There is no server to send it to.
What it checks
These are the defects that produce Excel's one unhelpful sentence. Each is silent — the file looks fine until Excel opens it.
- Parts with no content type. Chart, drawing, pivot and worksheet parts each
need their own
<Override>in[Content_Types].xml. The generic<Default Extension="xml">looks like it covers them and does not. - Relationships pointing at nothing — an
r:idwhose target part is not in the package. - Orphaned parts — a drawing or chart nothing refers to.
- A
<drawing>in the wrong place. It must be the last child of<worksheet>, after</sheetData>, and there may be only one per sheet. - Duplicate shape ids within one drawing part.
- Charts with no series, or with unprefixed elements — every element in a chart part must carry its namespace prefix.
- Pivot tables whose cache is not bound — a
cacheIdnot declared in<pivotCaches>, a table part with no relationship to its cache definition, or arecordCountthat disagrees with the records actually written.
The same check in your build
This page is a wrapper around one function. If you would rather fail the build than find out in Excel:
const { validate } = require('chartsheet')
const fs = require('fs')
const result = await validate(fs.readFileSync('report.xlsx'))
if (!result.valid) {
console.error(result.errors.join('\n'))
process.exit(1)
}
It works on any .xlsx, whatever wrote it.
Questions
Is my spreadsheet uploaded?
No. There is no server. The file is read in your browser and the check runs there.
Excel repaired the file. What did it remove?
Whatever it could not read. It discards the broken parts and writes a clean file, which is why charts and pivot tables vanish after a repair with no error shown. Checking before Excel touches it tells you what was about to be lost.
It says valid, but Excel still complains.
This checks package structure — content types, relationships, part placement — which is what breaks in generated files. It does not validate every element against the full ECMA-376 schema. If the structure is sound and Excel still objects, the problem is inside a part rather than in how the parts are wired. Open an issue with the file if you can share it.
My charts disappeared after a round trip and there was no error at all.
That is a different problem — the file is not broken, the charts were simply never written. Here is what happens and how to stop it.