We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cell value incorrectly replaced when using Accounting format and converted to HTML

When a cell is using the Accounting format and the workbook is converted to HTML, the cell value will get replaced with # characters even though the value would fit.


In the attached workbook, cell A1 is using the Accounting format and must be 91px wide to get a proper HTML conversion. Auto-sizing the column in Excel sets the column width to 72. If the format is switched to Currency the column can be as little as 56px wide and it converts correctly.

Converted HTML (column A width = 90px):

@page {mso-header-data: ; mso-footer-data: ; margin: 0.75in 0.7in 0.75in 0.7in; mso-header-margin: 0.3in; mso-footer-margin: 0.3in; mso-page-orientation: Portrait; } TABLE { mso-displayed-decimal-separator: "."; mso-displayed-thousand-separator: "," } TR { mso-height-source: auto; mso-ruby-visibility: none } COL { mso-width-source: auto; mso-ruby-visibility: none } BR { mso-data-placement: same-cell } RUBY { RUBY-ALIGN: left } .style0 { BORDER-TOP-STYLE: none; FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; BORDER-BOTTOM-STYLE: none; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; mso-number-format: General; mso-pattern: auto; mso-protection: locked visible; mso-style-name: Normal; mso-style-id: 0 } .font0 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal } .font1 { FONT-SIZE: 11pt; FONT-FAMILY: "Tahoma","sans-serif"; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal } TD { BORDER-TOP-STYLE: none; FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; BORDER-BOTTOM-STYLE: none; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; mso-number-format: General; mso-pattern: auto; mso-protection: locked visible; mso-style-parent: style0; mso-ignore: padding } .style0 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible; mso-style-name: "Normal" } .style1 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style2 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style3 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style4 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style5 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style6 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style7 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style8 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style9 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style10 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style11 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style12 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style13 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style14 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .x15 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-number-format: General; mso-pattern: auto; mso-protection: locked visible; mso-style-parent: style0 } .style16 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-number-format: "0%"; mso-pattern: auto; mso-protection: locked visible; mso-style-name: "Percent" } .style17 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-number-format: "_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)"; mso-pattern: auto; mso-protection: locked visible; mso-style-name: "Currency" } .style18 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-number-format: "_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)"; mso-pattern: auto; mso-protection: locked visible; mso-style-name: "Currency [0]" } .style19 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-number-format: "_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)"; mso-pattern: auto; mso-protection: locked visible; mso-style-name: "Comma" } .style20 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-number-format: "_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)"; mso-pattern: auto; mso-protection: locked visible; mso-style-name: "Comma [0]" } .x21 { FONT-SIZE: 11pt; FONT-FAMILY: "Tahoma","sans-serif"; VERTICAL-ALIGN: bottom; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal; mso-number-format: General; mso-pattern: auto; mso-protection: locked visible; mso-style-parent: style0 } .x22 { FONT-SIZE: 10pt; BORDER-TOP: windowtext 1px solid; FONT-FAMILY: "Arial","sans-serif"; BORDER-RIGHT: windowtext 1px solid; VERTICAL-ALIGN: bottom; BACKGROUND: #d3d3d3; WHITE-SPACE: nowrap; BORDER-BOTTOM: windowtext 1px solid; FONT-WEIGHT: 400; FONT-STYLE: normal; TEXT-ALIGN: center; BORDER-LEFT: windowtext 1px solid; mso-number-format: General; mso-pattern: auto none; mso-protection: locked visible; mso-style-parent: style0; mso-diagonal-down: none; mso-diagonal-up: none } .x23 { FONT-SIZE: 11pt; BORDER-TOP: windowtext 1px solid; FONT-FAMILY: "Tahoma","sans-serif"; BORDER-RIGHT: #d3d3d3 1px solid; VERTICAL-ALIGN: bottom; WHITE-SPACE: nowrap; BORDER-BOTTOM: #d3d3d3 1px solid; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal; BORDER-LEFT: windowtext 1px solid; mso-number-format: "_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)"; mso-pattern: auto; mso-protection: locked visible; mso-style-parent: style17; mso-diagonal-down: none; mso-diagonal-up: none } .x24 { FONT-SIZE: 11pt; BORDER-TOP: windowtext 1px solid; FONT-FAMILY: "Tahoma","sans-serif"; BORDER-RIGHT: #d3d3d3 1px solid; VERTICAL-ALIGN: bottom; WHITE-SPACE: nowrap; BORDER-BOTTOM: #d3d3d3 1px solid; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal; BORDER-LEFT: #d3d3d3 1px solid; mso-number-format: General; mso-pattern: auto; mso-protection: locked visible; mso-style-parent: style0; mso-diagonal-down: none; mso-diagonal-up: none } .x25 { FONT-SIZE: 11pt; BORDER-TOP: windowtext 1px solid; FONT-FAMILY: "Tahoma","sans-serif"; BORDER-RIGHT: #d3d3d3 1px solid; VERTICAL-ALIGN: bottom; WHITE-SPACE: nowrap; BORDER-BOTTOM: #d3d3d3 1px solid; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal; BORDER-LEFT: #d3d3d3 1px solid; mso-number-format: "_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)"; mso-pattern: auto; mso-protection: locked visible; mso-style-parent: style17; mso-diagonal-down: none; mso-diagonal-up: none }
A B C
1 ######### 500 #########

Converted HTML (column A width = 91px):

@page {mso-header-data: ; mso-footer-data: ; margin: 0.75in 0.7in 0.75in 0.7in; mso-header-margin: 0.3in; mso-footer-margin: 0.3in; mso-page-orientation: Portrait; } TABLE { mso-displayed-decimal-separator: "."; mso-displayed-thousand-separator: "," } TR { mso-height-source: auto; mso-ruby-visibility: none } COL { mso-width-source: auto; mso-ruby-visibility: none } BR { mso-data-placement: same-cell } RUBY { RUBY-ALIGN: left } .style0 { BORDER-TOP-STYLE: none; FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; BORDER-BOTTOM-STYLE: none; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; mso-number-format: General; mso-pattern: auto; mso-protection: locked visible; mso-style-name: Normal; mso-style-id: 0 } .font0 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal } .font1 { FONT-SIZE: 11pt; FONT-FAMILY: "Tahoma","sans-serif"; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal } TD { BORDER-TOP-STYLE: none; FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; BORDER-BOTTOM-STYLE: none; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; mso-number-format: General; mso-pattern: auto; mso-protection: locked visible; mso-style-parent: style0; mso-ignore: padding } .style0 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible; mso-style-name: "Normal" } .style1 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style2 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style3 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style4 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style5 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style6 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style7 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style8 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style9 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style10 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style11 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style12 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style13 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .style14 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-pattern: auto; mso-protection: locked visible } .x15 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-number-format: General; mso-pattern: auto; mso-protection: locked visible; mso-style-parent: style0 } .style16 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-number-format: "0%"; mso-pattern: auto; mso-protection: locked visible; mso-style-name: "Percent" } .style17 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-number-format: "_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)"; mso-pattern: auto; mso-protection: locked visible; mso-style-name: "Currency" } .style18 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-number-format: "_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)"; mso-pattern: auto; mso-protection: locked visible; mso-style-name: "Currency [0]" } .style19 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-number-format: "_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)"; mso-pattern: auto; mso-protection: locked visible; mso-style-name: "Comma" } .style20 { FONT-SIZE: 10pt; FONT-FAMILY: "Arial","sans-serif"; VERTICAL-ALIGN: middle; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; FONT-STYLE: normal; mso-number-format: "_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)"; mso-pattern: auto; mso-protection: locked visible; mso-style-name: "Comma [0]" } .x21 { FONT-SIZE: 11pt; FONT-FAMILY: "Tahoma","sans-serif"; VERTICAL-ALIGN: bottom; WHITE-SPACE: nowrap; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal; mso-number-format: General; mso-pattern: auto; mso-protection: locked visible; mso-style-parent: style0 } .x22 { FONT-SIZE: 10pt; BORDER-TOP: windowtext 1px solid; FONT-FAMILY: "Arial","sans-serif"; BORDER-RIGHT: windowtext 1px solid; VERTICAL-ALIGN: bottom; BACKGROUND: #d3d3d3; WHITE-SPACE: nowrap; BORDER-BOTTOM: windowtext 1px solid; FONT-WEIGHT: 400; FONT-STYLE: normal; TEXT-ALIGN: center; BORDER-LEFT: windowtext 1px solid; mso-number-format: General; mso-pattern: auto none; mso-protection: locked visible; mso-style-parent: style0; mso-diagonal-down: none; mso-diagonal-up: none } .x23 { FONT-SIZE: 11pt; BORDER-TOP: windowtext 1px solid; FONT-FAMILY: "Tahoma","sans-serif"; BORDER-RIGHT: #d3d3d3 1px solid; VERTICAL-ALIGN: bottom; WHITE-SPACE: nowrap; BORDER-BOTTOM: #d3d3d3 1px solid; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal; BORDER-LEFT: windowtext 1px solid; mso-number-format: "_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)"; mso-pattern: auto; mso-protection: locked visible; mso-style-parent: style17; mso-diagonal-down: none; mso-diagonal-up: none } .x24 { FONT-SIZE: 11pt; BORDER-TOP: windowtext 1px solid; FONT-FAMILY: "Tahoma","sans-serif"; BORDER-RIGHT: #d3d3d3 1px solid; VERTICAL-ALIGN: bottom; WHITE-SPACE: nowrap; BORDER-BOTTOM: #d3d3d3 1px solid; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal; BORDER-LEFT: #d3d3d3 1px solid; mso-number-format: General; mso-pattern: auto; mso-protection: locked visible; mso-style-parent: style0; mso-diagonal-down: none; mso-diagonal-up: none } .x25 { FONT-SIZE: 11pt; BORDER-TOP: windowtext 1px solid; FONT-FAMILY: "Tahoma","sans-serif"; BORDER-RIGHT: #d3d3d3 1px solid; VERTICAL-ALIGN: bottom; WHITE-SPACE: nowrap; BORDER-BOTTOM: #d3d3d3 1px solid; FONT-WEIGHT: 400; COLOR: #000000; FONT-STYLE: normal; BORDER-LEFT: #d3d3d3 1px solid; mso-number-format: "_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)"; mso-pattern: auto; mso-protection: locked visible; mso-style-parent: style17; mso-diagonal-down: none; mso-diagonal-up: none }
A B C
1 $ 800.00 500 #########


The following code is used to convert to HTML:
wbCopy.Save(outputStream, new HtmlSaveOptions(SaveFormat.Html) { ExportActiveWorksheetOnly = true, ExportImagesAsBase64 = true, });

Hi,

Thanks for your posting and using Aspose.Cells.

We tested this issue with the following sample code using the latest version:

Aspose.Cells
for .NET v8.6.3.5
and were not able to replicate it. The generated output html is fine without any problem. I have attached the output html for your reference.

C#

string filePath = @“D:\Downloads\AcctFmtHtml.xlsx”;

Workbook wbCopy = new Workbook(filePath);

wbCopy.Save(filePath + “.out1.html”, new HtmlSaveOptions(SaveFormat.Html) { ExportActiveWorksheetOnly = true, ExportImagesAsBase64 = true, });

Thank you for testing. I’ve isolated the problem a little further and determined that the problem gets introduced when a worksheet is copied.

I’m sorry that I didn’t catch that before posting.

Please use the following code to duplicate the problem using the previously attached workbook.

string filePath = @“c:\temp\AcctFmtHtml.xlsx”;

var workbook = new Workbook(filePath);
var wbCopy = new Workbook(workbook.FileFormat);

// copy the worksheets
for (int i = 0; i < workbook.Worksheets.Count; ++i)
wbCopy.Worksheets[i].Copy(workbook.Worksheets[i]);

wbCopy.Save(filePath + “.out1.html”, new HtmlSaveOptions(SaveFormat.Html) { ExportActiveWorksheetOnly = true, ExportImagesAsBase64 = true, });


Thanks

BTW is v8.6.3.5 a dev build? I’m using v8.6.3 and don’t see a newer version posted.

Hi,

Thanks for your effective code and using Aspose.Cells.

8.6.3.5 is actually a minor version. It is not available on the downloads section. We provide it by attaching it in the forums. The next major release will be 8.7.0 which you can download from downloads section. You can download the minor version from this link:

Aspose.Cells
for .NET v8.6.3.5
.

However your issue does occur with the 8.6.3.5. We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSNET-44187 - Cell values are incorrectly replaced with # when converted to HTML

Hi again,


This is to update you that we have resolved the problem logged earlier as CELLSNET-44187. We will shortly provide the fix here after ensuring the quality and incorporating other enhancements.

Hi,


Please try our latest version/fix: Aspose.Cells for .NET v8.7.0.3 (attached)

We have fixed your issue now.

Let us know your feedback.

Thank you.

I’ve verified the fix.


Thank you.

Hi,


Thank you for the confirmation. It is good to know that you are up & running again. Please feel free to contact us back in case you need our further assistance with Aspose APIs.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.