none
Excel Documents unreadable by Android and Blackberry RRS feed

  • Question

  • I am having an issue with Excel documents generated by the SDK. It seems that Blackberry and Android phones are not able to open them. These are the steps that I am using to test: 

    1.) Create an excel file in Excel 2007 (blank) 
    2.) Use the Productivity Tool to generate the code for the blank excel file. 
    3.) I added a class in a test application to generate the document. 
    4.) When I run the app, everything goes smoothly. The file is created and I can open it with Excel 2007 with no warnings or errors. I also validated the generated file in the Productivity tool and did not receive any errors. 
    5.) When I try to open the original document on both phones I do not have any problem. If I try to open the generated document, I receive a file is corrupt error on both phones. 
    6.) If I save the generated document in excel the phones can open it just fine. 
    7.) I also compared the 2 files with the Productivity Tool and the only difference was the order in which the xml namespace and declarations were written, along with the modified timestamp. 

    I really do not understand what is different between the 2 files or what could be causing this. 

    Thanks in advance, 
    Terry 

      I believe that I've narrowed this down to the format of the xml that openXML SDK uses.  When I modify/create an excel file with the SDK, it uses the following namespace declaration for the sheet1.xml and workbook.xml:

    xmlns:<strong>x</strong>="http://schemas.openxmlformats.org/spreadsheetml/2006/main"

    However, if I decrompress a file that I create in Excel 2007, the declaration does not include the x.  It is simply:

    xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"

    It seems like the android and blackberry are not liking the xmlns:x.

    Is there any way to make the SDK write the namespace without a prefix?

    Any help would be greatly appreciated.

    Thanks.

    *** UPDATE ***

    I was able to get this to work on the blackberry by removing the prefix on the declaration.  It is still not working on android though.

    Monday, November 1, 2010 8:53 PM

All replies

  • Hi,

    Thanks for posting in detail about the problem.

    Could you please let us know what software on these phones are complaining about it?

    Thanks
    Ankush


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Ankush Microsoft Online Community Support
    Monday, November 8, 2010 10:26 AM
  • This is happening on the Droid and the Apple IPhone 4S as well as the new IPAD. Is there a work around for this issue? This is urgent. Thanks.
    Thursday, March 22, 2012 11:27 PM
  • I compared the xlsx file before I would save it in excel (the SAVED ONE) does open on mobile devices. I changed the extensions to .zip so I could compare the contents of all the files in both documents and they were far from identical. This leads me to believe that the issue is in the SDK.

    The only work around was after the xlsx file is created is to open it in Excel and then SAVE it. Then it works. This is a bug in Microsoft Open SDK.


    Friday, March 23, 2012 11:37 AM