Incorrect width when convert xls to html and show it in chrome

incorrect width when convert xls to html in chrome

aspose cells version:19.11(lastest)
chrome version:70

ie:
image.png (6.6 KB)

chrome:
image.png (4.7 KB)

how can i fix it?

@yuweiming314,

Thanks for the screenshots.

Please zip your template XLS file and attach it here, so we could evaluate your issue soon.

cloumn width problem.zip (7.4 KB)

@yuweiming314,

Please try our latest version/fix: Aspose.Cells for .NET v19.11.8 (attached)
Aspose.Cells19.11.8 For .Net2_AuthenticodeSigned.Zip (5.0 MB)
Aspose.Cells19.11.8 For .Net4.0.Zip (5.0 MB)

I have tested your scneario/ case by converting your template file to HTML file format with v19.11.7, it works fine and I do not see the issue with column widths in the output HTML.

Let us know if you still find any issue.

@Amjad_Sahi, I’m confused that i search from Aspose.Cells | Excel Spreadsheet Processing Java Library but the latest version is 19.11 and file size about 22MB,and the attach 19.11.7 file size about 7MB。what the different between 19.11 and 19.11.7? thank you for your answer。

@yuweiming314,

If you are using Java version, please try our latest version/fix: Aspose.Cells for Java v19.11.7 (attached)
aspose-cells-19.11.7.zip (6.7 MB)

@Amjad_Sahi, I’m confused that i search from https://downloads.aspose.com/cells/java but the lastest version is 19.11 and file size about 22MB,and the attach 19.11.7 file size about 7MB。what the different between 19.11 and 19.11.7? thank you for your answer。

sitll have cloumn width problem with java version 19.11.7

chrome:
image.png (3.3 KB)

ie:
image.png (2.9 KB)

please use chrome 78 and make a test

@yuweiming314,
You may please give a try to the following sample code and share the feedback.

Workbook workbook = new Workbook(dataDir + "cloumn width problem.xls");
// Create HtmlSaveOptions object
HtmlSaveOptions options = new HtmlSaveOptions();
options.setHtmlCrossStringType(HtmlCrossType.FIT_TO_CELL);
options.setPresentationPreference(true);
// Save the Excel file to HTML with specified option
workbook.save(dataDir + "outPresentationlayout2.html", options);

Regarding the size confusion if you expand the zip file from the download section, it contains following two zip files in the JDK 1.6 folder:

aspose-cells-19.11-java.zip

aspose-gridweb-19.11-java.zip

Now if you further expand the aspose-cells-19.11-java.zip it contains aspose-cells-19.11.jar (7.2MB) file in
aspose-cells-19.11-java\JDK 1.6\aspose-cells-19.11-java\lib.

Hence the regular release contains multiple contents whereas the JAR file is of same size about 7MB. Whereas the hot fix only contains this JAR file therefore its size is 7MB.

it work! thank you for your sample code

@yuweiming314,

Good to know that your issue is sorted out by the suggested code segment. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.