Avatar of Jeet Doshi
Jeet Doshi

asked on 

.xltm file opens as .xlsx file

I am facing the issue while opening an Excel macro-enabled template(.xltm) file when I open from my application.

I have gone through this "http://stackoverflow.com/questions/21850650/issue-with-excel-template-fileswhich"  tells how the .xltm file opens. Here I want to override the orignal .xltm file so I need to open the same in .xltm format programatically in c#.

Below is code used to call the Workbooks.Open.

`Globals.ThisAddIn.Application.Workbooks.Open(DisplayFile, false, false, Type.Missing, "", "",
                                Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
                                Type.Missing, 0)`

However, it opens the file in Excel in .xlsx format only.

Need suggestions on what needs to be changed in calling the 'Workbooks.Open' method or any other method can be used.
Microsoft ExcelMicrosoft OfficeC#

Avatar of undefined
Last Comment
Jeet Doshi

8/22/2022 - Mon