Buttons ExcelHtml5 error when columns contains comma

Buttons ExcelHtml5 error when columns contains comma

umauk01umauk01 Posts: 2Questions: 1Answers: 0
edited January 2016 in Free community support

Please see the formatted text below.

Thanks and regards,
Uma

Answers

  • umauk01umauk01 Posts: 2Questions: 1Answers: 0
    edited January 2016

    Hi

    We have a column which contains comma in-between, when we do the export as excel using new buttons.js, the generated excel sheet cannot be opened, it gives a error " Illegal qualified name character. Line 1, column 1664" attached below

    <?xml version="1.0" encoding="UTF-8" standalone="true"?> -<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"> <logFileName>error039240_01.xml</logFileName> <summary>Errors were detected in file 'C:\Users\xxx\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\GBHADC86\Central Results.xlsx'</summary> -<additionalInfo> <info>Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.</info> </additionalInfo> -<removedParts summary="Following is a list of removed parts:"> <removedPart>Replaced Part: /xl/worksheets/sheet1.xml part with XML error. Illegal qualified name character. Line 1, column 1664.</removedPart> </removedParts> </recoveryLog>
    

    I tried list of options:

    1) c# ==> .Replace(",", "&#44;"), - replaced command to AscII code - did not fix it.
    

    2) tried fieldBoundry - did not fix it.

    {
                                            extend: 'excelHtml5',
                                            text: "<i class='fa fa-file-text-o'></i> Excel",
                                            extension: '.xlsx',
                                            fieldBoundary: "",
                                            exportOptions: {
                                                columns: [ 0, ':visible' ]
                                            }
                                        },
    

    please help to fix this problem.

    As this is my first post, please let me know, if you need anything else.

    Thanks and regards, Uma

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Hi,

    There is no fieldBoundary for the excelHtml5 button type.

    Can you try using the nightly version of Buttons please. If that doesn't work, then please l ink to a test case showing the issue, as per the forum rules.

    Allan

This discussion has been closed.