Column width is larger in v10.2.0 than in v10.1.0 using client side ExcelIO

Posted by: jarle.roti on 25 September 2017, 6:58 am EST

  • Posted 25 September 2017, 6:58 am EST

    Hi,

    I have a column width problem when showing an excel document in the browser using the client side ExcelIO method.

    I tested the client side import example (found here https://www.grapecity.com/en/blogs/how-to-importexport-excel-files-using-javascript-and-spread-sheets) and it worked great (column width matched the excel document) but when I upgraded the example to use v10.2.0 of the spreadJs scripts all the columns got a bit larger, see attached screenshot.

    Is this by design or is it a bug in the 10.2.0 version? (Same thing happens with the 10.2.2 DevChannel version)

    I really need to use the 10.2.0 version but this is kind of a showstopper.

  • Posted 26 September 2017, 7:59 am EST

    Hello,

    SpreadJS Client side Excel IO feature is introduced in SpreadJS v10.

    SpreadJS v9.0 only had the Excel IO service. Also I open an Excel file with latest SpreadJS v10.2.3 and the column width appears to be absolutely fine.

    Please download the build from here:

    https://cdn.grapecity.com/devchannel/SpreadJS.Evaluation.10.2.3.zip

    and the test the “Inspector” sample by importing the attached Excel file:

    Downloads\SpreadJS.Evaluation.10.2.3\Spread.Sheets\Spread.Sheets.Evaluation.10.2.3\samples\InspectorSample

    Thanks.

    Deepak Sharma

    export.zip

  • Posted 27 September 2017, 2:16 am EST

    Hi again,

    I did what you asked and opened the export.xlsx in the InspectorSample in both 10.2.3 and 10.1.0 and I get different column size between the two versions. See attached image.

    Obviously something has changed when calculating the column widths.

    Regards,

    Jarle

  • Posted 28 September 2017, 6:04 am EST

    Hello,

    There is one change made for height/width of the rows/columns between v10.1 and 10.2.3.

    With the latest build(10.2.3) it does not set the hidden row’s height and hidden column’s width to zero. So you can get back to the original height and width upon unhinding the row or column.

    However your issue does not look related to this behavior.

    Do you find the width of the Column different from what you see in Excel after importing with Spread.Sheets 10.2.3?

    Thanks,

    Deepak Sharma

  • Posted 29 September 2017, 3:46 am EST

    Yes, when I open the document in Exel the column widths are smaller than what is shown in the InspectorSample in the 10.2.3 version.

    I also tried to export it to a new Excel file from the InspectorSample in 10.2.3 and when I open that in excel the columns seem to have correct size (same as in the original Excel file).

  • Posted 29 September 2017, 6:11 am EST

    Hello,

    Since Excel Column width depends on current font but SpreadJS use default font hence column widths are different. Please have a look at link below:-

    https://support.microsoft.com/en-us/help/214123/description-of-how-column-widths-are-determined-in-excel

    Hope it helps.

    Thanks,

    Reeva

  • Posted 29 September 2017, 7:02 am EST

    So what has changed in the column width calculation from SpreadJs 10.1 to 10.2?

  • Posted 4 October 2017, 10:43 am EST

    Hi,

    I will check it with the concerned team and let you know.

    Thanks,

    Deepak Sharma

  • Posted 5 October 2017, 9:00 am EST

    Hello,

    I have submitted a request for this issue. The tracking Id for the same is 246844. I will let you know as soon as I hear anything on this.

    Thanks,

    Deepak Sharma

  • Posted 10 October 2017, 8:02 am EST

    Hi,

    Thanks for checking this. Any news yet?

    I downgraded to 10.1.0 but got into other issues that was fixed in the later versions and when testing the devchannel/hotfix builds to find the best suitable version for me it seems that the column width change was introduced in v 10.1.3.

    Thanks,

    Jarle

  • Posted 11 October 2017, 4:49 am EST

    He Jarle,

    This issue is still with the developer. I have asked for an update on this, I will let you know as soon as I hear anything on this.

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels