Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Handling of \r and \n in xlsx export

    Hi!

    It seems that SmartGWT will export both \r and \n as Line Feed character (\r not export as Carriage Return character) when export to xlsx (tested on SmartGWT 6.0p 2019-02-09 release).

    This is the sample UI:
    Click image for larger version

Name:	UI.png
Views:	207
Size:	32.3 KB
ID:	256879
    This is the sheet1.xml extracted from the xlsx. All \n and \r combination are exported as "

":
    sheet1.xml

    Following is sample codes:
    client: FrmMainSearch.java
    ds: customDataSource_user.ds.xml
    server: UserDataSource.java

    As different version of Microsoft Excel will handle cell containing <CR> and <LF> in xlsx differently, I would like to be able to export \n as Line Feed character and \r as Carriage Return character, but tested many ways with no success. Any suggestion how I can achieve that?

    Thank you very much!

    #2
    We are not reproducing this issue and we are not involved in the character conversion, it is done by Apache POI. In our tests \r and \n characters where exported correctly. This means that most likely something is different in your environment. This may be different POI lib version (not the one we ship), unusual JVM encoding setting or even something on Excel part. If you can show us how to reproduce the problem, we can take another look, but currently there's nothing more we can do.

    Comment


      #3
      Thank you very much for your information, I will test further on this.

      Comment

      Working...
      X