Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- _excel = new Excel.Application();
- _excel.Visible = false;
- _workbook = _excel.Workbooks.Add( Type.Missing );
- _worksheet = (Excel.Worksheet)_workbook.Sheets[1];
- createColumnHeaders();
- _workbook.SaveCopyAs( savePath );
- }
- catch (Exception ex)
- {
- Logger.Error( "Error creating spreadsheet: {0}", ex.Message );
- }
- finally
- {
- // Cleanup
- }
- SaveAs( savePath,
- Excel.XlFileFormat.xlWorkbookNormal,
- Type.Missing,
- Type.Missing,
- false,
- false,
- XlSaveAsAccessMode.xlNoChange,
- Type.Missing,
- Type.Missing,
- Type.Missing,
- Type.Missing,
- Type.Missing );
- 'C://temp/00-04.20.18-24-07-2014/' cannot be accessed. The file may be corrupted,
- located on a server that is not responding, or read-only.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement