The "Save Template" action in SAS® Financial Management Excel Add-In for Microsoft Excel might fail with "Microsoft Excel cannot access the file"


When you create a new form set, you should use the "Save Template" action to save all changes. In some scenarios, though, this action fails and displays a generic pop-up error message. In addition, the SAS Financial Management Add-In for Microsoft Excel log contains the following message: 

System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Excel cannot access the file 'C:\Users\sasinst_copy.SERVERLR\Documents\My SAS Files\FMTempFiles\26C15500'. There are several possible reasons:

• The file name or path does not exist. 

• The file is being used by another program.

• The workbook you are trying to save has the same name as a currently open workbook. at Microsoft.Office.Interop.Excel.WorkbookClass.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) at SASSESExcelAddIn.ApplicationController.purgeTableContents(String wbName, BookController bc) at SASSESExcelAddIn.ApplicationController.saveFMTemplate(Int32 row_Excel, Int32 column_Excel, Object userInfo, BookController bcFound)

Cause

The Microsoft Excel save path configuration, which typically includes the user name, is the root cause of this issue. When the user name contains a dot (.), the issue occurs. 

For example, if the user name is sasinst.SERVERLR and the default Microsoft Excel save path is C:\Users\sasinst.SERVERLR\Documents\My SAS Files, the error occurs and the following message is displayed.

Microsoft Excel cannot access the file 'C:\Users\sasinst_copy.SERVERLR\Documents\My SAS Files\FMTempFiles\26C15500'. 

This error occurs because the C:\Users\sasinst_copy.SERVERLR\ path does not exist on the file system.

Workaround

Currently, this issue occurs if the Windows userid contains a dot (.) or the Microsoft Excel Save option contains a dot in the Auto Recover file location or in the Default Local file location. 

A fix for this issue is not currently available. 

To work around this issue, do either of the following: