Download it now!
Bug 118463 - Cannot Save Excel 2007-2013 XML Macro-Enabled Template (.xltm)
Summary: Cannot Save Excel 2007-2013 XML Macro-Enabled Template (.xltm)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks: XLSX
  Show dependency treegraph
 
Reported: 2018-06-29 22:40 UTC by flywire
Modified: 2020-03-26 06:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description flywire 2018-06-29 22:40:25 UTC
Description:
There is no option to save a file as an Excel 2007-2013 XML Macro-Enabled Template (.xltm). This is basic functionality.

Steps to Reproduce:
Save file

Actual Results:
No option

Expected Results:
Option available


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 flywire 2018-07-01 10:13:00 UTC
Name: [Content_Types].xml

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">

Test.xlsx\
<Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" PartName="/xl/workbook.xml"/>

Test.xlts\
<Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml" PartName="/xl/workbook.xml"/>


Test.xlsm\
<Override ContentType="application/vnd.ms-excel.sheet.macroEnabled.main+xml" PartName="/xl/workbook.xml"/>

Test.xltm\
<Override ContentType="application/vnd.ms-excel.template.macroEnabled.main+xml" PartName="/xl/workbook.xml"/>
Comment 2 Aron Budea 2018-07-02 03:39:32 UTC
Seems logical that this should be supported (with the usual limitations that come with Excel macro support in LO), confirming.
Comment 3 Joel Madero 2018-07-02 13:52:42 UTC
This is really an enhancement request. It's not currently supported, it's not a bug (i.e., implemented and then working incorrectly).
Comment 4 flywire 2018-07-02 20:44:27 UTC
I disagree. Microsoft Excel 2007-2013 XML (.xlsx)(*.xlsx) is supported and so is  Microsoft Excel 97-2003 Template (.xlt)(*.xlt). I consider the omission of Excel 2007-2013 XML Macro-Enabled Template (.xltm) is enough to call it a bug.

Anyway, the fix is fairly trivial - a new menu item and one word in the output file.
Comment 5 Markus Mohrhard 2018-07-21 23:46:14 UTC
(In reply to flywire0 from comment #4)
> I disagree. Microsoft Excel 2007-2013 XML (.xlsx)(*.xlsx) is supported and
> so is  Microsoft Excel 97-2003 Template (.xlt)(*.xlt). I consider the
> omission of Excel 2007-2013 XML Macro-Enabled Template (.xltm) is enough to
> call it a bug.
> 
> Anyway, the fix is fairly trivial - a new menu item and one word in the
> output file.

This is not just a simple fix. As macro export is quite complicated and not specified in any standard our export is quite young and quite heavily bound to the XLSX export code. In the past we stored the imported macro stream unchanged back which was clearly not a clever idea.

I'd expect this to be at least one man week of work to make it useful and untangle the XLSM export that we currently have.
Comment 6 flywire 2018-10-17 09:22:49 UTC
Essentially there are two issues here:
1) Templates are not supported for current version. Given they are supported for a previous version i think it is a bug they were overlooked.
2) Macros are not supported for current version. Given they are supported for a previous version i think it is a bug they were overlooked. the fact that LibreOffice will not run the macros has nothing to do with this request. The macros are obviously written in excel and the functionality would simply retain them.
Comment 7 flywire 2018-10-17 09:26:41 UTC
Currently I unzip file, change one word, rename file and zip it again. It works but it is a pain.

@Markus Mohrhard Why tie a trivial excercise to "make it useful and untangle the XLSM export that we currently have."
Comment 8 Markus Mohrhard 2018-11-06 19:08:49 UTC
(In reply to flywire0 from comment #7)
> Currently I unzip file, change one word, rename file and zip it again. It
> works but it is a pain.
> 
> @Markus Mohrhard Why tie a trivial excercise to "make it useful and untangle
> the XLSM export that we currently have."

How can you judge that it is a trivial exercise. Note that as I mentioned the export for XLSM is hacked into the normal XLSX export and this would need some untangling to support XLTM. This is more work than just adding two additional filter entries in a list.
Comment 9 flywire 2019-03-04 21:54:53 UTC
In addition to *.xlsx and *.xlsm formats *.xltx is supported thanks to bug 99438 fix in LibreOfficeDev Calc 6.3.0.0. Calc can't create or run excel macros but should still be able to use the files and retain that functionality for excel after the files are saved.

@Markus_Mohrhard I think you are over-thinking it. I agree it could be nicer but as you say "not just a simple fix".

Why can't the "export for XLSM ... hacked into the normal XLSX export" be used changing the ContentType if a template parameter is passed to it? (Prefer to take discussion offline.)
Comment 10 flywire 2019-03-04 22:02:01 UTC
https://git.libreoffice.org/core/+/8cc29e7040ed02afd5f979e23c9ec154c0cb2c83%5E%21
"Added support for content type... template with macros (.xltm, but no user interface for this yet)."
Comment 11 flywire 2019-05-11 22:11:24 UTC
Are we really going to go to a release without enabling the SaveAs MS_macro_template code? https://ibb.co/xmj0CXf

Unbelievable!
Comment 12 flywire 2020-03-26 06:18:27 UTC
(In reply to flywire from comment #10)
> https://git.libreoffice.org/core/+/
> 8cc29e7040ed02afd5f979e23c9ec154c0cb2c83%5E%21
> "Added support for content type... template with macros (.xltm, but no user
> interface for this yet)."

@Vasily Melenchuk - Any action on this? Looking for interface to use existing macro code with templates not rewrite macro code.