Wijmo Excel file parser fails with certain column names

Posted by: deborah on 11 June 2021, 5:12 am EST

    • Post Options:
    • Link

    Posted 11 June 2021, 5:12 am EST - Updated 3 October 2022, 4:35 am EST

    When uploading an Excel file from Project Online that contained the column header - %SummaryBelow - I received the above console error.

    Is there a way for this to be fixed so that characters like this don’t cause parsing errors?

    Thanks in advance,

    Deborah

  • Posted 14 June 2021, 11:09 pm EST

    Hi Deborah,

    I apologize for the delay in response. Can you please share the excel file which causes this error? Also please share the code using which you are importing the excel file.

    Regards,

    Ashwin

  • Posted 15 June 2021, 7:14 pm EST

    File exported from Project Online

    ProjectCenter.zip

  • Posted 15 June 2021, 7:20 pm EST

    Hi Ashwin,

    Thank you for your reply.

    Please find the file attached and my code below:

    
    function parseExcelFile(file) {
        var reader = new FileReader();
    
        reader.onload = function(e) {
            var data = e.target.result,
                   workbook = new wijmo.xlsx.Workbook();
    
            workbook.loadAsync(data, (workbookInstance) => {
                        ...
            });
        };
    
        reader.onerror = function(ex) {
            console.log(ex);
        };
    
        reader.readAsDataURL(file);
    }
    
  • Posted 16 June 2021, 11:34 pm EST

    Hi Deborah,

    I have tested your excel file and I found that the issue is with the file. I have tested your excel data in another excel file, and it’s working fine. I have attached an excel file with your data.

    Could you please confirm that if are still getting any issue with this file as well? Can you also let me know from where did you get this excel file?

    ~regards

    ProjectCenter_updated.zip

  • Posted 20 June 2021, 11:41 pm EST

    Hi Ashwin,

    I’m aware that the data itself works once moved to another file.

    The issue seems to occur when uploading a file directly after it’s been exported from Project Online via SharePoint. This converts a MS Project into an Excel file.

    The task I had was to be able to parse an Excel file without a user having to make any changes to the file. I was able to find another library - SheetJS - that parsed the file without any problem so I assumed it would be a potentially fixable bug with the Wijmo one.

    Kind regards,

    Deborah

  • Posted 22 June 2021, 8:11 pm EST

    Hi Deborah,

    I understand your issue but I am afraid this is not a bug in Wijmo. Wijmo only supports excel files created by excel itself or by any of the wijmo controls. As per my understanding, this file created by a 3rd party library in Sharepoint. There may be some issues in file creation. We do not provide support for SheetJS so we do have an idea on why this works in this library.

    Moreover, if you will open the excel file, click on enable editing (if it is displayed), and save it again without any edits, it will be imported without any issues in FlexGrid. Now, this happens because when you save the excel file again, the excel fixes all these issues automatically so Wijmo does not have any problem importing it.

    I hope this clears your doubts.

    ~regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels