var file = "c:\\temp\\print_missing_2.xlsx";
var workbook = new Workbook(file);
var worksheet = workbook.Worksheets["Sheet1"];
var name = workbook.Worksheets.Names["DR_PUBv2__1655026955"];
worksheet.PageSetup.PrintArea = name.GetRange().Address;
workbook.Worksheets.ActiveSheetIndex = worksheet.Index;
workbook.Save("c:\\temp\\print_missing_2.html", HtmlSaveOptions);
The input file and the output files are attached in the zip file.
The issue is: In the output HTML, the bottom border is missing.
Which version of Aspose.Cells for .NET you are using? I tested your scenario/case with your template file using our latest version/fix: Aspose.Cells for .NET 22.6.1 (please try it if you are not already using it) in simple .NET project on Windows8, it works fine and I do not get the issue regarding bottom border.
e.g. Sample code:
var file = "e:\\test2\\print_missing_2.xlsx";
HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions(SaveFormat.Html);
htmlSaveOptions.ExportPrintAreaOnly = true;
htmlSaveOptions.ExportActiveWorksheetOnly = true;
var workbook = new Workbook(file);
var worksheet = workbook.Worksheets["Sheet1"];
var name = workbook.Worksheets.Names["DR_PUBv2__1655026955"];
worksheet.PageSetup.PrintArea = name.GetRange().Address;
workbook.Worksheets.ActiveSheetIndex = worksheet.Index;
workbook.Save("e:\\test2\\print_missing_2.html", htmlSaveOptions);
Please find attached the output HTML file for your reference. files1.zip (18.3 KB)
After looking into your shared html file, the last two rows are missing.
It seems that the html file is modified after being generated by Aspose.Cells.
Please share us the html file directly generated by Aspose.Cells. Also please share us the HtmlSaveOptions used on your side.