Excel file SaveAs not working for xls type from a c# application which has office 365 installed

  • Thread starter Thread starter DeepsP
  • Start date Start date
D

DeepsP

Guest
Issue:

File save API of excel interop fails when file format is xls.


API - this.workBook.SaveAs(fileName, XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);


log obtained'

Exception Occurred Exception Message : ファイルを保存できませんでした。 Exception Type : System.Runtime.InteropServices.COMException Error Code(HRESULT) : 800A03EC Error Code(HRESULT in int) : -2146827284 Stack Trace : 場所 Microsoft.Office.Interop.Excel._Workbook.SaveAs(Object Filename, Object FileFormat, Object Password, Object WriteResPassword, Object ReadOnlyRecommended, Object CreateBackup, XlSaveAsAccessMode AccessMode, Object ConflictResolution, Object AddToMru, Object TextCodepage, Object TextVisualLayout, Object Local)
場所 Utilities.ExcelWriting.ExcelWriter.Save(String& fileName)


PC set up - Win 10 with office 365 Pro Plus ja- jp(64 bit) installed


Analysis - The same API successfully saves the file in xlsx format.

File save path is a one drive mapped path - C:\Users\A10564\OneDrive - Sample\デスクトップ\FileName1.xls - file save fails

C:\Users\A10564\OneDrive - Sample\デスクトップ\FileName1.xlsx - file save success


Note: Issue is not observed in another win 10 pc with same office set up.


Kindly let us know your feedback

Continue reading...
 
Back
Top