I am trying to create an html body from several worksheets for an email that will be sent using an email app that we developed that uses SMTP. I’ve tried the following to generate HTML and MHtml, but the mail app doesn’t seem to render the pages properly:
HtmlSaveOptions opt = new HtmlSaveOptions();
opt.ExportPrintAreaOnly = true;
opt.Encoding = System.Text.Encoding.UTF8;
opt.ExportWorksheetCSSSeparately = false;
Where location is the file path.
I’ve also tried htmlWb.Save(@"", SaveFormat.MHtml); to save as MHtml at the specified location, but the problem that I have is that the styles get lost, and the tables won’t look properly.
What do you guys recommend me to do to achieve what I need?