views:

452

answers:

1

I'm creating some excel sheets (xlsx) through Excel Package library.

Some of them are corrupted, so when I try to open it on Excel, a generic error is displayed and the file doesn't open (the error: "The converter failed to save the file" - this is because I'm using Excel 2003 with compatibility pack, maybe in Excel'07 the error is different, I don't know).

Is there any tool that could show me which errors my xlsx does have?

A: 

Are you working with styles at all? That is the most common error I've seen with the Excel Package.

I don't have any tool to help you but you can unzip the xlsx file and see the individual parts. Comparing that against the spec was helpful, albeit very time consuming, for me.

As a side note, unless you are absolutely tied to Excel 2007 (xlsx), you should consider using NPOI, the .NET port of the Apache POI API. It is under active development, faster, and much more stable than the Excel Package.

Nate