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

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 OpenXmlValidator
on 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

It seems Workbook.XML doesn't have all the information needed by Excel for pagination while prepare for print.
Using your sample code, here is the XML generated for Workbook.XML part within Open XML package :
<?xml version="1.0" encoding="utf-8"?>
<x:workbook xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
  <x:sheets>
    <x:sheet name="Drivers" sheetId="1" r:id="rId1" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" />
    <x:sheet name="Vehicles" sheetId="2" r:id="rId2" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" />
    <x:sheet name="Vehicle owners" sheetId="3" r:id="rId3" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" />
  </x:sheets>
</x:workbook>
Replace above content with below XML and print should work fine:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
  <fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="9303"/>
  <workbookPr defaultThemeVersion="124226"/>
  <bookViews>
    <workbookView xWindow="510" yWindow="510" windowWidth="4455" windowHeight="2520"/>
  </bookViews>
  <sheets>
    <sheet name="Drivers" sheetId="1" r:id="rId1"/>
    <sheet name="Vehicles" sheetId="2" r:id="rId2"/>
    <sheet name="Vehicle owners" sheetId="3" r:id="rId3"/>
  </sheets>
  <calcPr calcId="0"/>
</workbook>
The change is not with data but few elements which define the view for Excel. The required code change can be found using Open XML SDK tool code-reflect.
Shiv Khare

Similar Messages

  • After update 7.1.0. my sound only works for phone calls,emails etc, but not for music or games

    after update 7.1.0. my sound only works for phone calls,emails etc, but not for music or games

    Maybe I understood your problem. Get to Settings > Sounds > Ringers and Alerts >Turn Change With Buttons to Off. And if your Side Switch is assigned to 'Mute', turn it back on, else, use the control center to turn off mute.
        P/s: And your name is...

  • Recently, I can't get any sound from my game applications.  Sound works fine with video, streaming, etc, but not my game applications.  I've tried powering down and re-booting, but the sound does not return.  Can anyone help me?

    Recently, I can't get any sound from my game applications.  Sound works fine with video, streaming, etc, but not my game applications.  I've tried powering down and re-booting, but the sound does not return.  Can anyone help me?

    Have you got notifications muted ? Only notifications (including games) get muted, so the Music and Videos apps, and headphones, still get sound.
    Depending on what you've got Settings > General > Use Side Switch To set to (mute or rotation lock), then you can mute notifications by the switch on the right hand side of the iPad above the volume switch, or via control centre : swipe up from the bottom edge of the screen and it's the right-most of the 5 icons in the middle of it (if the icon is white then it's 'on', tap it to turn it grey and 'off'). The function that isn't on the side switch is set via control centre instead : http://support.apple.com/kb/HT4085

  • Camera app won't work camera works (FaceTime and photo booth, etc) but not in camera mode what is wrong and howmdominfix?

    When I open the camera app all I get is a black screen. If I choose FaceTime or photo booth it works just fine so camera itself is fine. It seems to be the app that is not fine.
    What is wrong and how do I fix it?

    Quit the camera app completely and then try it again..
    Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button.
    Try the camera app again.

  • Created a pdf from a word-file and inserted formfields. The fields works in other pdf-readers(nitro,reader etc), but not in adobe reader and acrobat. Please help.

    Hi,
    I have created a pdf from a word-file and inserted formfields for a work related file. I've used nitro pro to create the formfield. They works in nitro, reader, foxit etc. but not adobe reader. From page 3 and out, the font wont show when writing in a formfield. Some formfield doesnt even show.
    Please help me fix this (hopefully before the presentation at work friday) :-)
    File in question: Dropbox - Byggeplassperm_bico_prosjektledelse_2.pdf
    Kind regards
    Tobias

    Agreed. Adobe makes no claims that their Reader will work properly with forms made from third party software.

  • Weblogic call a excel-file from URL doesn't open MSExcel but flat html

    Weblogic call a excel-file from URL doesn't open MSExcel but flat html
    Hi,
    WLS 10.3.5
    Forms 11.1.1.4
    I do migrate from AS10g to WLS 10.3.5 / Forms 11
    I get differences between FORMS 10 g / AS and FORMS 11 / WLS
    when call an excel-file with web.showdocument
    in 10g AS10g
    the call
    web.showdocumen('http://MyAS10_Server/myFormsMapping/myExcelfile.xls, _blank);
    opens a Windows-Box
    to decide
    open with ( MSExcel )
    or
    download and save as File
    in WLS 10.3.5 / FORMS 11.1.1.4
    the call with webcache Port 8090 as well as Port OHS 8888
    web.showdocumen('http://MyWLS_Server:8090/myFormsMapping/myExcelfile.xls, _blank);
    opens promptly the excel-File into the Browser as html-Format
    How to get the same way under WLS as before in AS 10g,
    config OHS ?
    regards
    get answer here :
    Weblogic: when call a excelfile from URL doesn't open MSExcel but flat html
    Edited by: astramare on Sep 12, 2011 11:59 AM

    Weblogic: when call a excelfile from URL doesn't open MSExcel but flat html

  • Is there a way to separate raw files from jpegs that are in one folder after downloading from camera when you shoot both together. I tried arrange or sort  by kind but that does not work. It arranges all folders but not the files in the folder., Is there

    Is there a way to separate raw files from jpegs that are in one folder after downloading from camera when you shoot both together. I tried arrange or sort  by kind but that does not work. It arranges all folders but not the files in the folder., Is there a way to separate raw files from jpegs that are in one folder after downloading from camera when you shoot both together. I tried arrange or sort  by kind but that does not work. It arranges all folders but not the files in the folder.

    Bridge will do the job. View > Sort > ByType. Then you can choose a group of one type and put the files in a separate folder.

  • Code is working fine with OIM9102 BP14 patch but not in OIM9102 BP20.

    Using OIM API calls, I am able to fetch usr_key and ugp_key succesfully when utilityFactory is initialized with system admin login.
    When utilityFactory is intialized with non system admin ID, usr_key and ugp_key is returning as "0".
    This code is working fine with OIM9102 BP14 patch but not in OIM9102 BP20. Do user need any access right to invoke API calls ? Any thing related to this is changed in this patch?
    Environment details:
    OIM 9102BP20
    Websphere 6.1

    No, no more rights are needed. If it is working fine into BP older than this one, raise a SR and ask support guys to file a bug. But you have to show them step-by-step working into the older one and not working on newer. It is quite difficult happen, but maybe this feature broken on new business patch 20.
    I hope this helps,
    THiago Leoncio.

  • My birthday calendar works on my computers and iphone, but not my wife's ipad. What to do.

    My birth calendar works on my computers and iphone but not on my ipad.

    How did the MP3 files get onto your iDevices Ii they're not in iTunes?
    The simplel rule is: Anything in iTunes can be synced to your devices, but no music files on your devices, except your purchases,  can be synced to your computer.

  • Works fine in JDK 6.0 but not in jdk 1.5.???????

    Hi all,
    This code converts english date to japanese date but it is working fine in english only. can any body answer why it is so.
    Note : No Comiplation problem in jdk 1.5
    This code works fine in JDK 6.0 but not in JDK 1.5, Why.....?
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
            Locale locale = new Locale("ja", "JP", "JP");//locale for Japanese
            Calendar cal = Calendar.getInstance(locale);  //japanese calender object
            DateFormat df = DateFormat.getDateInstance(DateFormat.LONG,locale);
            try{
            Date date = sdf.parse("1930/09/27");
                System.out.println(df.format(date));
            }catch(Exception e){
                System.out.println(e.getMessage());
            }

    Hi,
    If I give the Input date 1930/10/27 (in english), then program must display the date as S5.10.27 (it's japanese date with 'S' indicating ERA)
    But this will happpen only when i run the program in JDK 6.0.
    In JDK 1.5, for the above input, the output is 1930/10/27 (which is wrong)
    Still I don't have compilation and running problems in both. Can anybody expalin why it is so?
    I think i tried my best to restate the question.
    Thanx
    Aris

  • My transparency does not work on my iPhone and I was wondering how I fix that? It worked when I first downloaded ios7 but not now.

    My transparency does not work on my iPhone and I was wondering how I fix that? It worked when I first downloaded ios7 but not now.

    Hello wilsontot_too,
    Thank you for the details of the issue you are experiencing on your iPhone.  It sounds like you are not noticing transparency on your iPhone.  It may be that you have "Increase Contrast" turned on in your iPhone settings.
    I recommend verifying that Increase Contrast is turned off in Settings>General>Accessibility.
    iPhone User Guide - Large, bold, and high-contrast text
    http://help.apple.com/iphone/7/#/iph73b89c6
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • I cannot get GPS Only to work on my ipad3 (4g version, but not on an active cell plan, and wifi off).  Is there some new requirement in 7.1 or 7.1.1 to have cell and/or wifi enabled for GPS to work? I am testing with MotionX

    It seems like I cannot get GPS only to work on my ipad3 (4g version, but not on an active cell plan, and wifi off).  Is there some new requirement in 7.1 or 7.1.1 to have cell and/or wifi enabled for GPS to work? I am testing with MotionX, garmin blueChart mobile, and a GPS monitoring tool. All show no signal. If I turn on cell and wifi,  it says I get gps signal, but can't tell if that is from the GPS chip, or just from cell and wifi only (maybe with some gps mixed in)?  Any ideas on how to get iPad working with GPS only??

    Roger that.  Thanks for your time.
    System:
    Windows 7 64bit
    Processor: AMD phenom IIX4 965
    RAM:  Gskill Ripsaw F3-12800CL7D-4GBRM (2-2GB sticks)
    GPU:EVGA Classified Nvidia GeForce GTX 560 Ti 448 core
    PSU: Kingwin 1000W laser gold (LZG-1000)
    Yes. tried the one ram stick, no go.  I have been trying to boot off/install the windows 7 disk but am unable to get to the point where windows starts installing after its gathering information portion of the install.  I can get to the disk selection screen of the install with the WD HD on SATA port 2 but then get the "cant install messages" when I try to select the Vertex 3.  Yes I can see the Vertex 3 Drive as well as the WD drive at this point.  some times I have to hit "scan" a couple of times.

  • I'm having problems with 8.1 and Continuity / Handoff. It will work fine for web pages, etc. but in email when I try to do it between by iPhone 5s running 8.1 and my Macbook Pro running Yosemite I consistently get an error.

    I'm having problems with 8.1 and Continuity / Handoff. It will work fine for web pages, etc. but in email when I try to do it between by iPhone 5s running 8.1 and my Macbook Pro running Yosemite I consistently get an error. "Failed to Continue Activity" Cocoa Error 4609.  Handoff is working for phone calls and text messages. By email just crashes each time. It was also doing it under 8.0.2.  My iPhone and iPad handle this fine. It's only the MacBook to the iPhone that fails, and only on email.

    Handoff Continuity Troubleshooting

  • I can not get Firefox to play music backgrounds on pages in browsers it works in IE and other browsers but not firefox, what HTML or Jave script do I need too use to make them work?

    I'm having a problem with firefox playing background music on some sites, it works with IE and other browsers but not with fire fox, what html or java script do I need to add to the pages so that they play the music?
    I develop my pages in Front Page and I know that the music only works in IE, so if someone can tell me how to correct this problem as it is important as I use fire fox as my main browser.
    I thank you in advance

    If a website uses BGSOUND then it will only work in IE.
    BGSOUND is not compatible with other browsers like Firefox.
    * http://kb.mozillazine.org/Background_music_does_not_play

  • I am unable to get Lightroom Mobile to work on my home network. The Ipad says "There are no collections to sync, enable lightroom mobile on your computer", but it is enabled.  I got it to work one time on another network but not at home where I use Lightr

    I am unable to get Lightroom Mobile to work on my home network. The Ipad says "There are no collections to sync, enable lightroom mobile on your computer", but it is enabled.  I got it to work one time on another network but not at home where I use Lightroom.

    Hi,
    could you please give us some info on what kind of network you have?
    Can other application communicate with the web?
    Thanks,
    Ignacio

Maybe you are looking for

  • ABAP MEMORY for Import

    Hi Please let me know how can i find the memory id name and from where for ABAP Memory . For ex : IMPORT IM_EKPO-KNTTP FROM MEMORY ID 'EKPO_MO' In the obove statement where can i find that this 'EKPO_MO' is memeory id  ?? << Moderator message - Every

  • Lightroom crashed while dragging a photo in Book module

    I was creating a book in Lightroom 5. While dragging a photo within the book Lightroom quit. An error window popped up and I sent the message per instruction. The message that came back stated Lightroom could not repair the problem. The screen is now

  • Iphone shows more photos in storage than in the photos app

    I have an iPhone 6 with 33 photos locally saved and 0 videos. but when I look at my storage under the settings app it shows 2.3Gb of storage being used for photo library. when using my pc to look at the DCIM folder it shows only the 33 photos with  a

  • Cost Center Disappearing When I remove Order Reason Code

    Hello SAP Experts, When the user removes ther order reason code and saves the order the value in the cost center disappears on the order. Anyone know why this is happening? Thanks, Patrick

  • Mouse Drag Box & get coordinates

    Hi, is there a API to do this. If you click the mouse button and drag it I want a box to appear on the screen. When they release I want to get the coordinates of the box. I have seen it commonly done in programs like Photoshop and even in java applet