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

Free Support Forum - aspose.com

Export range to HTML and picture -> alignment issue

I am using the code below to export a range to the html file.
I have an image in the first cell of the range and the cell alignment is set to left.
I am seeing the image correctly in Excel (see attached), but in HTML the image could not be fully seen.

using (var fstream = new FileStream(dataDir + "TestExport.xlsx", FileMode.Open))
{
	// Instantiate a Workbook object that represents the existing Excel file
	var workbook = new Workbook(fstream);
	
	var sheet = workbook.Worksheets["Sheet1"];

	workbook.Worksheets.ActiveSheetIndex = sheet.Index;

	var range = workbook.Worksheets.GetRangeByName("SOME_RANGE");

	sheet.PageSetup.PrintArea = range.Address;

	// Save the Excel file
	workbook.Save(dataDir + "1.html", new HtmlSaveOptions
	{
		ExportImagesAsBase64 = true,
		ExportPrintAreaOnly = true,
		ExportHiddenWorksheet = false,
		ExportActiveWorksheetOnly = true
	});
}

align_issue.zip (19.2 KB)

@eyalmolad,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-48329 - Picture alignment issue when export range to HTML

@eyalmolad,

This is to inform you that the issue has been resolved. After performing QA and incorporating other extensions and fixes, we will provide you the fixed version within a couple of days.

@eyalmolad,
Please try the latest fix .
Aspose.Cells21.7.5 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells21.7.5 For .Net4.0.Zip (5.6 MB)
Aspose.Cells21.7.5 For .NetStandard20.Zip (5.6 MB)

The issues you have found earlier (filed as CELLSNET-48329) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao