locked
OOXML 2007 Excel Spreadsheet opens in 2010 but not 2013 RRS feed

  • Question

  • We are using a non-OO programming language (UniData's UniBasic from Rocket) to export data from a table to an Excel spreadsheet.  Originally written as an OOXML spreadsheet compatible with Excel 2007, the resulting spreadsheet can also be opened using Excel 2010.  When attempting to open the spreadsheet with Excel 2013, however, a popup dialogue informs me that "We found a problem with some content in EXPORT.xlsx.  Do you want us to try to recover as much as we can?  If you trust the source of this workbook, click Yes."  Since I trust the content of the workbook I just created, I clicked Yes.  After I click Enable Editing, I get a popup that "Excel was able to open the file by repairing or removing the unreadable content."  The log file shows:

    <?xml version="1.0" encoding="UTF-8" standalone="true"?>
    -<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error008480_01.xml</logFileName><summary>Errors were detected in file 'EXPORT.DIR\EXPORT.xlsx'</summary>-<additionalInfo><info>Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.</info></additionalInfo>-<repairedParts summary="Following is a list of repairs:"><repairedPart xml:space="preserve">Repaired Part: /xl/worksheets/sheet1.xml part. </repairedPart></repairedParts></recoveryLog>

    Unfortunately, the log file does not reveal what was repaired or how.  Below is the xml for sheet1.  

    What is the difference between Excel 2013 xml tags and those for 2010?

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" 
    xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
    <dimension ref="A1:XFD5"/>
    <sheetViews><sheetView tabSelected="1" workbookViewId="0"></sheetView></sheetViews>
    <sheetFormatPr defaultRowHeight="15"/>
    <cols>
    <col min="1" max="1" width="13.8" customWidth="1"/>
    <col min="2" max="2" width="11.5" customWidth="1"/>
    <col min="3" max="3" width="12.65" customWidth="1"/>
    </cols>
    <sheetData>
    <row r="1" spans="1:3">
    <c r="A1" s="1" t="s"><v>0</v></c>
    <c r="B1" s="1" t="s"><v>1</v></c>
    <c r="C1" s="1" t="s"><v>2</v></c>
    </row>
    <row r="2" spans="1:3">
    <c r="A2" t="s"><v>3</v></c>
    <c r="B2" t="s"><v>4</v></c>
    <c r="C2" t="s"><v>5</v></c>
    </row>
    <row r="3" spans="1:3">
    <c r="A3" t="s"><v>6</v></c>
    <c r="B3" t="s"><v>7</v></c>
    <c r="C3" t="s"><v>8</v></c>
    </row>
    </sheetData>
    <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>
    </worksheet>

    Wednesday, November 20, 2013 5:48 PM

Answers

  • Hi Larry,

    I created a similar workbook and made a test for this issue, but I cannot open it both in Excel 2010 and Excel 2013.

    After removing t="s" and s="1", the workbook will be opened successfully.

    If conveniently, share the whole Excel workbook through SkyDirve for us to reproduce this issue.

    As far as I know, s (CellType.StyleIndex Property) =”1” means current cell format is an text data type.

    t (CellType.DataType Property) =”s” means current cell value is a string and the value might be “0”, correspondingly there must be a sharedStrings.xml to store the string value.

    If a cell value is a string, it might be like this:

    <c r="D1" t="s">
        <v>0</v>
    </c>

    We can’t concurrently use t=”s” and s=”1” in the same cell.

    For more information, please refer to:

    CellType Members

    So the correct xml might be like this:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
    <dimension ref="A1:XFD5"/><sheetViews>
    <sheetView tabSelected="1" workbookViewId="0"></sheetView></sheetViews>
    <sheetFormatPr defaultRowHeight="15"/><cols>
    <col min="1" max="1" width="20.28515625" customWidth="1"/>
    <col min="2" max="2" width="21.85546875" customWidth="1"/>
    <col min="3" max="3" width="16.85546875" customWidth="1"/></cols>
    <sheetData>
    <row r="1" spans="1:3">
    <c r="A1" s="1"><v>1</v></c>
    <c r="B1" s="1"><v>2</v></c>
    <c r="C1" s="1"><v>3</v></c></row>
    <row r="2" spans="1:3">
    <c r="A2" s="1"><v>4</v></c>
    <c r="B2" s="1"><v>5</v></c>
    <c r="C2" s="1"><v>6</v></c></row>
    <row r="3" spans="1:3">
    <c r="A3" s="1"><v>7</v></c>
    <c r="B3" s="1"><v>8</v></c>
    <c r="C3" s="1"><v>9</v></c></row>
    </sheetData><pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>
    </worksheet>

    In addition, there is a tool from Microsoft that we can use it to view the xml file of Office:

    Open XML SDK 2.5 for Microsoft Office

    After downloading the SDK, you could use Open XML SDK 2.5 Productivity Tool for Microsoft Office to view the xml file.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Edited by George Hua Tuesday, November 26, 2013 4:38 AM
    • Marked as answer by George Hua Thursday, November 28, 2013 7:57 AM
    Friday, November 22, 2013 10:04 AM

All replies

  • Hi Larry,

    I created a similar workbook and made a test for this issue, but I cannot open it both in Excel 2010 and Excel 2013.

    After removing t="s" and s="1", the workbook will be opened successfully.

    If conveniently, share the whole Excel workbook through SkyDirve for us to reproduce this issue.

    As far as I know, s (CellType.StyleIndex Property) =”1” means current cell format is an text data type.

    t (CellType.DataType Property) =”s” means current cell value is a string and the value might be “0”, correspondingly there must be a sharedStrings.xml to store the string value.

    If a cell value is a string, it might be like this:

    <c r="D1" t="s">
        <v>0</v>
    </c>

    We can’t concurrently use t=”s” and s=”1” in the same cell.

    For more information, please refer to:

    CellType Members

    So the correct xml might be like this:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
    <dimension ref="A1:XFD5"/><sheetViews>
    <sheetView tabSelected="1" workbookViewId="0"></sheetView></sheetViews>
    <sheetFormatPr defaultRowHeight="15"/><cols>
    <col min="1" max="1" width="20.28515625" customWidth="1"/>
    <col min="2" max="2" width="21.85546875" customWidth="1"/>
    <col min="3" max="3" width="16.85546875" customWidth="1"/></cols>
    <sheetData>
    <row r="1" spans="1:3">
    <c r="A1" s="1"><v>1</v></c>
    <c r="B1" s="1"><v>2</v></c>
    <c r="C1" s="1"><v>3</v></c></row>
    <row r="2" spans="1:3">
    <c r="A2" s="1"><v>4</v></c>
    <c r="B2" s="1"><v>5</v></c>
    <c r="C2" s="1"><v>6</v></c></row>
    <row r="3" spans="1:3">
    <c r="A3" s="1"><v>7</v></c>
    <c r="B3" s="1"><v>8</v></c>
    <c r="C3" s="1"><v>9</v></c></row>
    </sheetData><pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>
    </worksheet>

    In addition, there is a tool from Microsoft that we can use it to view the xml file of Office:

    Open XML SDK 2.5 for Microsoft Office

    After downloading the SDK, you could use Open XML SDK 2.5 Productivity Tool for Microsoft Office to view the xml file.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Edited by George Hua Tuesday, November 26, 2013 4:38 AM
    • Marked as answer by George Hua Thursday, November 28, 2013 7:57 AM
    Friday, November 22, 2013 10:04 AM
  • Thanks for the response!  I inherited this project from another programmer, so I will need to dig into the code producing the xml in order to determine why the attributes are set the way they are.  I'll post back with my progress.  Thanks again!
    Friday, November 22, 2013 7:46 PM