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.
Can you prepare a small demo project and a data file to demonstrate the issue?
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.
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.
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.