My main goal is to dynamically create xls containing an html table on the server in my .NET application. However, the Datamodel of my HTML table is quite complicated, but I managed to create a model using dotliquid for another use case - export to the pdf function of my application. Here I use the EO.pdf library of the main objects.
Now I hope that there is no need to do the “double job”, because at some point in my code I have full HTML markup from which the PDF is actually generated.
Code to create my pdf:
#region plan
string legend = string.Empty;
string allg = string.Empty;
int lineCount = 0;
int dayCount = 0;
var plan = Utils.Pdf.ConvertToPdf.ConvertPlanTemplate(out allg, out legend, out lineCount, out dayCount);
if (RequestValues.Extension.ToLower() == "pdf")
{
...
var doc = new EO.Pdf.PdfDocument();
EO.Pdf.HtmlToPdf.ConvertHtml(plan, doc, options);
...
}
EO "ConvertHtml" -Method html ( dotliquid) PdfDocument-.
, , NPOI. HTML xls/xlsx NPOI ( )?
,
getoveritde