jQuery UI Widgets Forums Grid Excel export is corrupted

This topic contains 5 replies, has 2 voices, and was last updated by  andre84 10 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Excel export is corrupted #62370

    andre84
    Participant

    Hello,
    When I export my grid in xls, I have this error an excel “my file is corrupted”. When I open with openOffice my worksheet is empty.
    Have you an idea where the error is occured

    Thanks for your help

    Best regards

    André

    Excel export is corrupted #62375

    Dimitar
    Participant

    Hello André,

    Please provide more details about your configuration, such as browser, browser version, jQWidgets version and grid settings applied. You may also post your call to the exportdata method. As you can see from the demo Data Export, jqxGrid correctly exports to a number of different formats, including Excel.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Excel export is corrupted #62383

    andre84
    Participant

    We use the last jQWidgets version.
    I use this method : $(“#jqxgrid”).jqxGrid(‘exportdata’, ‘xls’, ‘jqxGrid’);
    it’s possible to force charset on export?

    This is the xml generate
    <?xml version=”1.0″?>
    <?mso-application progid=”Excel.Sheet”?>
    <Workbook xmlns=”urn:schemas-microsoft-com:office:spreadsheet”
    xmlns:o=”urn:schemas-microsoft-com:office:office”
    xmlns:x=”urn:schemas-microsoft-com:office:excel”
    xmlns:ss=”urn:schemas-microsoft-com:office:spreadsheet”
    xmlns:html=”http://www.w3.org/TR/REC-html40″>
    <DocumentProperties xmlns=”urn:schemas-microsoft-com:office:office”>
    <Version>12.00</Version>
    </DocumentProperties>
    <ExcelWorkbook xmlns=”urn:schemas-microsoft-com:office:excel”>
    <WindowHeight>8130</WindowHeight>
    <WindowWidth>15135</WindowWidth>
    <WindowTopX>120</WindowTopX>
    <WindowTopY>45</WindowTopY>
    <ProtectStructure>False</ProtectStructure>
    <ProtectWindows>False</ProtectWindows>
    </ExcelWorkbook>
    <Styles>
    <Style ss:ID=”xls-style-1″ ss:Name=”xls-style-1″>
    <Alignment ss:Vertical=”Bottom” ss:Horizontal=”Left”/>
    <Borders>
    <Border ss:Position=”Bottom” ss:LineStyle=”Continuous” ss:Weight=”1″ ss:Color=”#DDDDDD”/>
    <Border ss:Position=”Left” ss:LineStyle=”Continuous” ss:Weight=”1″ ss:Color=”#DDDDDD”/>
    <Border ss:Position=”Right” ss:LineStyle=”Continuous” ss:Weight=”1″ ss:Color=”#DDDDDD”/>
    <Border ss:Position=”Top” ss:LineStyle=”Continuous” ss:Weight=”1″ ss:Color=”#DDDDDD”/>
    </Borders>
    <Font ss:Color=”#545454″ ss:Bold=”1″ />
    <Interior ss:Color=”#FFFFFF” ss:Pattern=”Solid”/>
    </Style>
    <Style ss:ID=”xls-style-2″ ss:Name=”xls-style-2″>
    <Alignment ss:Vertical=”Bottom” ss:Horizontal=”Left”/>
    <Borders>
    <Border ss:Position=”Bottom” ss:LineStyle=”Continuous” ss:Weight=”1″ ss:Color=”#DDDDDD”/>
    <Border ss:Position=”Left” ss:LineStyle=”Continuous” ss:Weight=”1″ ss:Color=”#DDDDDD”/>
    <Border ss:Position=”Right” ss:LineStyle=”Continuous” ss:Weight=”1″ ss:Color=”#DDDDDD”/>
    <Border ss:Position=”Top” ss:LineStyle=”Continuous” ss:Weight=”1″ ss:Color=”#DDDDDD”/>
    </Borders>
    <Font ss:Color=”#545454″ />
    <Interior ss:Color=”#FFFFFF” ss:Pattern=”Solid”/>
    </Style>
    <Style ss:ID=”xls-style-3″ ss:Name=”xls-style-3″>
    <Alignment ss:Vertical=”Bottom” ss:Horizontal=”Left”/>
    <Borders>
    <Border ss:Position=”Bottom” ss:LineStyle=”Continuous” ss:Weight=”1″ ss:Color=”#DDDDDD”/>
    <Border ss:Position=”Left” ss:LineStyle=”Continuous” ss:Weight=”1″ ss:Color=”#DDDDDD”/>
    <Border ss:Position=”Right” ss:LineStyle=”Continuous” ss:Weight=”1″ ss:Color=”#DDDDDD”/>
    <Border ss:Position=”Top” ss:LineStyle=”Continuous” ss:Weight=”1″ ss:Color=”#DDDDDD”/>
    </Borders>
    <Font ss:Color=”#545454″ />
    <Interior ss:Color=”#F9F9F9″ ss:Pattern=”Solid”/>
    </Style>
    </Styles>
    <Worksheet ss:Name=”Sheet1″>
    <Table>
    <Column ss:Width=”100″/>
    <Column ss:Width=”100″/>
    <Column ss:Width=”100″/>
    <Column ss:Width=”100″/>
    <Column ss:Width=”100″/>
    <Column ss:Width=”100″/>
    <Column ss:Width=”100″/>
    <Row>
    <Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Type</Data></Cell>
    <Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Désignation</Data></Cell>
    <Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>N° Interne</Data></Cell>
    <Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>N° série</Data></Cell>
    <Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Référence</Data></Cell>
    <Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Constructeur</Data></Cell>
    <Cell ss:StyleID=”xls-style-1″><Data ss:Type=”String”>Etat</Data></Cell>
    </Row>
    <Row>
    <Cell ss:StyleID=”xls-style-2″><Data ss:Type=”String”>Incident</Data></Cell>
    <Cell ss:StyleID=”xls-style-2″><Data ss:Type=”String”>Accès MS Outlook</Data></Cell>
    <Cell ss:StyleID=”xls-style-2″><Data ss:Type=”String”>ttt – 053310</Data></Cell>
    <Cell ss:StyleID=”xls-style-2″><Data ss:Type=”String”></Data></Cell>
    <Cell ss:StyleID=”xls-style-2″><Data ss:Type=”String”></Data></Cell>
    <Cell ss:StyleID=”xls-style-2″><Data ss:Type=”String”></Data></Cell>
    <Cell ss:StyleID=”xls-style-2″><Data ss:Type=”String”>Fermé</Data></Cell>
    </Row>
    </Table>
    </Worksheet>
    </Workbook>

    Excel export is corrupted #62392

    andre84
    Participant

    I found the problem, I have a special characters because we ‘re french. I don’t know how solve it.
    It’s possible to encode in utf-8(without bom) or a paramaeter when we export?

    Thanks for your help

    André

    Excel export is corrupted #62435

    Dimitar
    Participant

    Hi André,

    Please refer to the forum topic Excel export and special characters (umlaut) to see how to solve this issue.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Excel export is corrupted #62561

    andre84
    Participant

    Thanks this works.
    For the others persons who have this problem :
    $(“#MyGrid”).jqxGrid(‘exportdata’, ‘xls’, “Title”, true, null, false, null, “UTF-8”);

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.