Solved

.xltm file opens as .xlsx file

Posted on 2016-10-24
3
53 Views
Last Modified: 2016-10-24
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.
0
Comment
Question by:Jeet Doshi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 33

Expert Comment

by:ste5an
ID: 41856639
When I understand you correctly: That's normal.

A template is "generated" when you save an Excel document by saving it as template. When opened in Excel it behavces like a "normal" workbook.
0
 
LVL 50

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 41856672
Hi,

pls try to change the argument Editable to true to be able to change the template

Regards
0
 

Author Closing Comment

by:Jeet Doshi
ID: 41856794
Its working after setting editable = true!!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question