Using ClosedXML
is it possible to show a new Excel.XLWorkbook()
in the GUI without first saving the file?
I am using VB .Net and moving from Microsoft.Office.Interop.Excel
to ClosedXML
to take advantage of the increased speed.
In Excel Interop I can create a new Excel.ApplicationClass
and choose whether to make Excel visible in the GUI by setting .interactive
and .visible
to TRUE
.
Is there an equivalent for ClosedXML
to show Excel in the GUI?
I cannot find anything in the ClosedXML
library that would appear to affect application visibility.
Microsoft.Office.Interop.Excel:
ExcelReport = New Excel.ApplicationClass
ExcelReport.Interactive = True 'True = Excel is interactive in the GUI
ExcelReport.Visible = True 'True = Excel is visible in the GUI
ClosedXML:
Dim wb = New Excel.XLWorkbook()
wb.Visible = True (no equivalent)
I know part of the beauty of ClosedXML
is that Excel is not actually required to generate the file, however I would like the ability to debug and visualise the file inside Excel during creation/writing.
I would also like the end user to decide whether or not to save the file and if so where to save it. Currently, using Excel Interop, the report is presented to to the end user in the GUI as an unsaved 'Book1' workbook. They can interact with the excel report without saving, close it, save it somewhere else.
Is this possible using ClosedXML
?