Quantcast
Channel: Open XML Format SDK forum
Viewing all articles
Browse latest Browse all 1288

OpenXML Excel file, works in Excel 2007, OpenOffice, etc but not in Excel 2010

$
0
0

Hi everyone,

I have a problem.  I host a free website, sharing source code and ideas with other developers.  One of my projects is a very simple C# class, which generates an Excel 2007 .xlsx file.  All source code is provided, along with a demo showing how to use it, free of charge.  No registration required.

http://www.mikesknowledgebase.com/pages/CSharp/ExportToExcel.htm

The .xlsx files that this class generates are fine, they open in Excel 2007 & OpenOffice, I've run the OpenXmlValidatoron the files, and there are no reported problems.

However, If I open the file in Excel 2010 (with SP1), it opens, but if I go to the Print or Print Preview screen, Excel 2010 crashes.  

Googling around, I've found that many many users have experienced problems with HP print drivers, I followed some suggestions, such as turning off multi-threading in Excel, but it makes no difference.  I tried setting the default printer as the "Microsoft XPS Document Writer", but it made no difference.

Here is a copy of the Excel file that my demo produces (and which crashes Excel 2010).   Can someone tell me why it opens okay, but then crashes Excel 2010 ?  

http://www.MikesKnowledgeBase.com/SampleCode/Sample.xlsx

I can get around the problem by loading this file in Excel 2010, saving it as an ".xls" file (!!) and re-loading that... but it kinda defeats the purpose.

And, more generally, why does Excel 2007, OpenOffice and the OpenXmlValidator consider it to be in the correct format, but it crashes Excel 2010 ?  I'm surprised that Excel 2010 doesn't at least attempt to report some kind of problem with the Excel file, rather than bombing out.

Mike



Viewing all articles
Browse latest Browse all 1288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>