Solved

.xltm file opens as .xlsx file

Posted on 2016-10-24
3
44 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
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 49

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article will show you how to use shortcut menus in the Access run-time environment.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

910 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now