?
Solved

.xltm file opens as .xlsx file

Posted on 2016-10-24
3
Medium Priority
?
67 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 35

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 52

Accepted Solution

by:
Rgonzo1971 earned 2000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

752 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