When I save an excel workbook :
xlWorkbook.SaveAs("C:\\output\\excelfile.xls", Excel.XlFileFormat.xlCSV,
misValue, misValue, false, false, Excel.XlSaveAsAccessMode.xlNoChange,
misValue, misValue, misValue, misValue, misValue);
it have no proplem.
But
String str = "C:\\output\\excelfile.xls";// or get file path from saveFileDialog
xlWorkbook.SaveAs(str, Excel.XlFileFormat.xlCSV,
misValue, misValue, false, false, Excel.XlSaveAsAccessMode.xlNoChange,
misValue, misValue, misValue, misValue, misValue);
I found "comexception was unhandled cannot access *.xls", why is that?
I just tried it and it works for me:
On the second SaveAs I get this prompt: