Free Support Forum - aspose.com

Problem with column width in imported spreadsheet

Hi,

Please take a look at the spreadsheet attached. This is an empty
spreadsheet with column width of first column in the first sheet set
to 33. When I open this spreadsheet as a workbook, the column width is
reported as 32.92. I am using Aspose cells v 2.1.0, and it used to
work fine with the previous version. Do you have a patch to fix this
problem or am I doing something wrong?

Column widths are reported properly for columns with default column
width though.

Thanks,
Srivatsa.


This message was posted using Email2Forum by Amjad Sahi. (attachment)

Hi Srivatsa,

Thanks for providing us the template excel file.

I
tested with your file and get the 32.933594 value for the first
worksheet’s column A using cells.getColumnWidth(0) API. I think when
you round this value it will be 33.0 which is fine similar to MS Excel.

Anyways, we will further look into it (if we can 100% match the value to MS Excel’ s) and get back to you soon.

Thank you.

Hi Srivatsa,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Which version were you using before V2.1? We have tested several versions from 1.9.x and all version return 32.933594 for the column's width. Please try this new fix; we have adjusted the width value closer to that shown in MS Excel.

Thank You & Best Regards,

The issues you have found earlier (filed as 11010) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi,


I see the same problem with the latest Aspose cells release (2.1.2). Could you please patch this one again and give me another verison of your library.

Thanks,
Srivatsa.

Hi,



Well, we have tested the version 2.1.2.0 and 2.1.2.4(fix) and both of them gave the valid result: 33.0 as the Column A’s width. We tested it on different machines too. It looks very strange as you are getting the issue. Please make sure and confirm us that you using the same template file and the right version?

Thank you.

I have attached a spreadsheet which is failing. Older version returns 230 for the column width of first column in the first sheet where as the new one is returning 260.

Hi,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We have found your mentioned issue after an initial test. We will look into it and get back to you soon. Your issue has been registered in our internal issue tracking system with issue id: CELLSJAVA-14825.

The issue occurs because we do not support "Calibri" font when converting width unit to pixels. We will give a fix for it soon.

Thank You & Best Regards,

Hi,

For the column width, it is a bit complex when converting the unit between characters and pixels. In MS Excel, the parameter for converting column width from characters to pixels is varied and depends on the Font(name and size) used in Workbook's default style. Because the parameter for calculating column width is different for different Fonts, the parameters for all Fonts and size would be a large set and currently we only support some part of it. Please try this fix (attached) which has supported the font used in your template file(Calibri with size 11).

Thank you.

The issues you have found earlier (filed as 14825) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.