excelExport.png (36.3 KB)
Hi, I am using Aspose.cells to convert html tables into excel but styles and image is not reflecting in excel which is of type xlsx format.
I am using aspose.cell version 18.
Below is the code to export :
string dir = @“directoryName”;
string FileName = “HCP_Fees_for_Services_and_Consultancy_20181114114513242.html”;
string inputfileName = dir + FileName;
string outputfileName = dir + “checkdatasa.xls”;
Aspose.Cells.HTMLLoadOptions hTMLLoad = new Aspose.Cells.HTMLLoadOptions(LoadFormat.Html);
hTMLLoad.IgnoreNotPrinted = true;
if (File.Exists(inputfileName))
{
Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook(inputfileName, hTMLLoad);
Aspose.Cells.Worksheet worksheet = null;
if (workbook != null)
{
worksheet = workbook.Worksheets[0];
worksheet.PageSetup.PrintTitleRows = "$1:$3";
}
//workbook.Save(outputfileName,SaveFormat.Xlsx);
worksheet.PageSetup.Orientation = Aspose.Cells.PageOrientationType.Portrait;
worksheet.Workbook.Save(outputfileName);