Excelworkbook SaveAs method not working.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abhishek Chauhan04
    New Member
    • May 2010
    • 2

    #1

    Excelworkbook SaveAs method not working.

    Hi,

    I an new to this forum, I trying to open an excel workbook update it with some details\data and the save it using excelWorkbook.S aveAs method but the exceution freezes at the SaveAs method with no exceptions at all.I am using version 11.0.0.0 of Microsoft.Offic e.Interop.Excel . PFB the piece of code for the same -

    Code:
    excelWorkbook.SaveAs(System.AppDomain.CurrentDomain.BaseDirectory + PCRFTempFolderKey + savedFileName, Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookNormal, null,null, false, false,Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,false, false, null, null, null);
    However if I take the file format as xlXMLSpreadshee t it works fine but then again there are certain images in my excel workbook which are not getting saved and also when the the saved excel is opened its shows an alert box saying that the format is different from what defined by the extension of the file.

    Also the same thing works fine if I use Version 12.0.0.0 of Miicrosoft.Offi ce.Interop.Exce l ( but I am supposed to use 11.0.0.0 only for xls files). I am not sure about the issue at all, please help me out if anyone has any solution for this.
  • Abhishek Chauhan04
    New Member
    • May 2010
    • 2

    #2
    Someone please pick this thread and help me out.

    Comment

    Working...