Ask Your Question

How a macro in the template got saved in new file created using this template? [closed]

asked 2014-11-04 17:33:21 +0200

Kunjomachen gravatar image

updated 2014-11-05 09:02:55 +0200

I have a calc template (ots) with a macro stored in it. When I create a new file using this template, I can use macro in it. But when I save the new file in xls format, the macro is not getting saved. That means when the new file is reopened after saving and closing, the macro is not there. Can I get a solution other than saving the file as ods?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-05 19:53:15.901102


Just tested it and couldn't verify this. My document created from an ots containing a macro worked fine after saving, closing and reloading (LibreOffice 4.3.2 Calc under Win 8.1). The file derived from the template obviously contains the macro. The macro is functional and can also be edited.

Lupp gravatar imageLupp ( 2014-11-04 23:00:57 +0200 )edit

Oh....I am saving the file in xls format. That may be the problem. Edited the question accordingly.

Kunjomachen gravatar imageKunjomachen ( 2014-11-05 08:58:43 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-11-05 11:08:47 +0200

Lupp gravatar image

updated 2014-11-05 11:18:59 +0200

Use '.ods' together with '.odt' or quit programming macros. (I don't use Excel for many years now and I have no access for testing. But: Excel comes with it's specific macro language VBA and does not support other styles/languages/APIs. You cannot expect a 'Star'BASIC' piece of code to pass twice through MS oriented filters and still work.)


Did you compare the code as you find it in the reopened '.XLS' with that one placed in the '.OTS' ?

edit flag offensive delete link more


@Lupp Thankyou for answering. No code is getting saved in xls format. I am using xls format because I want to open the file in my android device too. I cant find a good app for android to open ods sheets.

Kunjomachen gravatar imageKunjomachen ( 2014-11-05 18:04:14 +0200 )edit

Question Tools

1 follower


Asked: 2014-11-04 17:33:21 +0200

Seen: 431 times

Last updated: Nov 05 '14