private static bool ExportToExcelFile(string AFilename, HtmlDocument AHTMLDocument) { // transform the HTML output to xlsx file ExcelPackage ExcelDoc = HTMLTemplateProcessor.HTMLToCalc(AHTMLDocument); if (ExcelDoc != null) { using (FileStream fs = new FileStream(AFilename, FileMode.Create)) { ExcelDoc.SaveAs(fs); fs.Close(); } return(true); } return(false); }
private static bool ExportToExcelFile(string AFilename, HtmlDocument AHTMLDocument) { // transform the HTML output to xlsx file XSSFWorkbook workbook = HTMLTemplateProcessor.HTMLToCalc(AHTMLDocument); if (workbook != null) { using (FileStream fs = new FileStream(AFilename, FileMode.Create)) { workbook.Write(fs); fs.Close(); } return(true); } return(false); }