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: 2024-03-27 03:14 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.
Comment 13 QA Administrators 2022-03-27 03:30:41 UTC Comment hidden (obsolete)
Comment 14 flywire 2022-03-27 23:14:30 UTC
Yes, bug still exists. It's obviously not in the File > Save as > Save as type - menu of formats available.

It seems there is a fundamental misunderstanding of the functionality. MS template and macro formats are supported (saved), despite the macros not actually running in lo. Surely it's reasonable to expect the template macro format to be saved. It's a trivial fix.

Version: 7.3.1.3 (x64) / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-AU (en_AU); UI: en-GB
Calc: threaded
Comment 15 QA Administrators 2024-03-27 03:14:11 UTC
Dear flywire,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug