Menu

#50 fpspreadsheet - xbiff/excel import does not create columns information

v1.0 (example)
closed-invalid
wp
None
5
2024-01-04
2021-12-14
No

Short introduction:
- one important information that is included in the column information is the column width
- The call to sheet.Addcol never happens but the corresponding FindCol ist called to check if it exists.
- The col information is read at TsSpreadBiffReader.ReadColInfo
- The attached patch adds a call to Sheet.AddCol for every new ColumnInfo read from the xbiff file.
- Without the ColInfo the exported files don't have the expected width.
Remark:
- tested with xbiff/excel import and ooxml export - checked with LibreOffice.
- In this file formats column information can be collected into one export entry, if they are side by side and hold the identically information - that would need some more rework of the column information.

1 Attachments

Discussion

  • wp

    wp - 2021-12-30

    Can you prepare a small demo project and a data file to demonstrate the issue?

     
  • Thomas Kaltenbrunner

    Strange - while retrying to reproduce it - it works all the time - without my patch.
    Furtheron after my patch there follows a WriteCol, which does what I was missing.
    Don't know why I didn't recognize it correctly.
    May be something else broke the exported file, so I searched the wrong thing.
    If it happens again, I will provide a Demo file directly. At the moment this can be closed.

     
  • Thomas Kaltenbrunner

    Finally I did find the file, which fails.
    But the patch seems nothing to change.
    Since the file is a little bit bigger and contains customer data, I am sorry, I cannot upload it here.
    I attach 2 screenshots to demonstrate the problem and the source of the little convert tool I wrote.
    I will inspect it again.

     
  • Thomas Kaltenbrunner

    Forget it. I got it now finally.
    The main reason was in the source file, which was generated with some duplicated row width information. The old export libary we used, did not check for duplicate entries - after removeing the duplicates from the source file - everything worked fine.
    Thanks - close it.

     
  • wp

    wp - 2024-01-04
    • status: open --> closed-invalid
    • assigned_to: wp
     

Log in to post a comment.