tabs characters lost on workbook to excel

1 Answer 60 Views
Spreadsheet
Bridge24
Top achievements
Rank 1
Iron
Iron
Bridge24 asked on 24 May 2024, 12:57 PM

We have some cells with tabs (\t) character we need to export to excel.

When exporting, the tabs are removed after calling the function workbook.toDataURLAsync.  

Can be reproduced here

https://dojo.telerik.com/@foxontherock/ATUzudIL

 

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 28 May 2024, 10:45 AM

Hello,

The reason for the observed behavior is the internal logic that strips similar characters. Here is the function that strips the tabs:

function stripFunnyChars(value) {
    return String(value)
        .replace(/[\x00-\x09\x0B\x0C\x0E-\x1F]/g, "") // leave CRLF in
        .replace(/\r?\n/g, "\r\n");                   // make sure LF is preceded by CR
}

Regards,
Peter Milchev
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
Spreadsheet
Asked by
Bridge24
Top achievements
Rank 1
Iron
Iron
Answers by
Peter Milchev
Telerik team
Share this question
or