private XlsSaveOptions GetSaveFormat(string format)
{
XlsSaveOptions saveOption = new XlsSaveOptions(SaveFormat.Xlsx);
switch (format)
{
case "xlsx":
saveOption = new XlsSaveOptions(SaveFormat.Xlsx); break;
case "xlsb":
saveOption = new XlsSaveOptions(SaveFormat.Xlsb); break;
case "xls":
saveOption = new XlsSaveOptions(SaveFormat.Excel97To2003); break;
case "txt":
saveOption = new XlsSaveOptions(SaveFormat.TabDelimited); break;
case "csv":
saveOption = new XlsSaveOptions(SaveFormat.CSV); break;
case "ods":
saveOption = new XlsSaveOptions(SaveFormat.ODS); break;
}
return saveOption;
}