we are having an issue on our service (docker that runs on Azure cloud as a kubernetes pod with Debian 11 OS.).
When we try to convert the name range DR_PUBv2__1648448656 in the sorce.xlsx we are having an issue with the formatting of cells N10, H10, N14, H14, N19 & H19
You can see that number is hidden behind red/green circle.
The code we run is below.
The source and the output are attached Html-Render-Docker.zip (24.1 KB)
We have logged a ticket with an id “CELLSNET-51608” for your mentioned issue. It works fine though if we execute your sample with your template file on Windows. The ticket is logged as following:
CELLSNET-51608 - Number is hidden behind red/green circle when exporting Excel to HTML on docker (Azure cloud kubernetes).
We will look into the details of the issue. Once we have an update on it, we will let you know.
The output html file you shared is modified by other program after it is generated by Aspose.Cells.
It seems that the html file you shared is broken, e.g. style x89 is missing which is used by class='x89' for Cell H10.
Please share us the html file directly generated by Aspose.Cells(without modified by other program) with the sample source file and code you shared:
We were finally managed to reproduce it.
please see the attached example, we exported to html the range of DR_PUBv2__1648448656
The attached html is a direct result from Aspose (no modification by “other program”).
This was reproducing also on my local machine. export-html-example.zip (19.4 KB)
I have logged your resource files with your existing ticket “CELLSNET-51608” into our database and reopened your issue again. We will look into the details of your issue and get back to you once an update is available.
I am following up on this issue since my colleague is on vacation.
Our code is not modifing the HTML - but it adds hyperlinks to all non empty cells with formulas. It is taking the existing style of the cells - adds the hyperlink and puts back the old style. input.zip (12.1 KB)
Attached also the actual file.
var HtmlSaveOptions = new HtmlSaveOptions
{
ExportImagesAsBase64 = true,
ExportPrintAreaOnly = true,
ExportHiddenWorksheet = false,
ExcludeUnusedStyles = true,
ExportActiveWorksheetOnly = true,
Encoding = Encoding.UTF8
};
var file = "c:\\temp\\input.xlsx";
using var workbook = new Workbook(file);
var worksheet = workbook.Worksheets["Sheet1"];
var name = workbook.Worksheets.Names["DR_PUBv2__1648448656"];
var range = name.GetRange();
var links = worksheet.Hyperlinks;
for (var rowOffset = 0; rowOffset < range.RowCount; rowOffset++)
{
for (var colOffset = 0; colOffset < range.ColumnCount; colOffset++)
{
var cell = range[rowOffset, colOffset];
if (!cell.IsFormula)
continue;
if (cell.Value == null || !cell.IsNumericValue)
continue;
var style = cell.GetStyle();
var styleSet = $"javascript:void(0);_AAAAXX$33_{cell.Name}";
links.Add(cell.Name, 1, 1, styleSet);
cell.SetStyle(style);
}
}
worksheet.PageSetup.PrintArea = name.GetRange().Address;
workbook.Worksheets.ActiveSheetIndex = worksheet.Index;
workbook.Save("c:\\temp\\my_file.html", HtmlSaveOptions);
This is to notify you that the issue has been resolved. This fix will be included in the next (upcoming) release (Aspose.Cells for .NET 22.9) scheduled for the second week of September 2022. You will also be notified when the next version is released.
The issues you have found earlier (filed as CELLSNET-51608) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi