First off: Thank you for a wonderful product..
I have created a small console application that converts a dataTable to Excel using closedXML. This is deployed on a windows server 2008. I get the following error:
The type initializer for 'ClosedXML.Excel.XLWorkbook' threw an exception.
at ClosedXML.Excel.XLWorkbook.set_DefaultRowHeight(Double value)
at ClosedXML.Excel.XLWorkbook..ctor(XLEventTracking eventTracking)
at vendorAppNotification.VAnotify.Main(String args)
Here is the code that throws the error:
// convert the datatable to excel
if (d.Rows.Count > 0)
var workbook = new ClosedXML.Excel.XLWorkbook();
d.TableName = FILENAME; // this is needed for the XLSx as the work book name
workbook.SaveAs(FILEPATH + FILENAME); // save the excel
The XLSX is created properly and saved when I run the program on my PC. I have office 2010 and there is no problem. The server does not have any form of office. Could this be an issue OR maybe a permission problem as I have limited rights on the server.