I'm attempting to make a C# Winform app perform better.
Previously, it took 100000 milliseconds to generate an Excel file (using Office.Interop.Excel). It takes roughly 5000ms when using ClosedXml. Really Excellent But I have to print this Excel file now (only a Worksheet or the entire workbook)
I was doing this before (using office interop) :
public void PrintCurrentWorksheet()
{
this._activeWorksheet.PrintOut(Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
}
public void PrintWorkbook()
{
this._activeWorbook.PrintOut(Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
}
However, XLWorkbook and IXLWorksheet are the new types of _activeWorkbook and _activeWorksheet. The Printout method does not exist. Since OpenXml is not dependent on Excel, I assume there is no print method, which I was unable to find. Am I correct?