spots Knight

spots Knight

  • NA
  • 35
  • 2.7k

Saving Excel file with _Workbook.SaveAs method problem

Nov 14 2016 6:19 PM
I have code to save a data table to an Excel file using the _Workbook.SaveAs method. When I open the resulting file it says the file type doesn't match and the name displayed at the top of the excel window instead of being the file name, just says Book1.xlsx.
 
 
The arguments of the method I'm using are 
xlWorkBook.SaveAs(File, Excel.XlFileFormat.xlWorkbookDefault, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
 
Am I missing a setting so when I try to open the file, it automatically recognizes the file as the correct format?

Answers (1)