Bug 139938 - by exporting an *.ods file with makros to an *.xlsm file no VBAProject created
Summary: by exporting an *.ods file with makros to an *.xlsm file no VBAProject created
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
: 107960 (view as bug list)
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
 
Reported: 2021-01-27 03:21 UTC by Harald Langheinrich
Modified: 2022-11-26 23:08 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
ods with macros self starting to page startseite (202.25 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-01-27 10:19 UTC, Harald Langheinrich
Details
selfstarting (opens page Startseite ) (194.28 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-01-27 12:34 UTC, Harald Langheinrich
Details
This is the result the xlsx -file (741.18 KB, application/vnd.ms-excel.sheet.macroEnabled.12)
2021-01-27 12:39 UTC, Harald Langheinrich
Details
the original .ods file (11.70 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-01-27 16:38 UTC, Harald Langheinrich
Details
This is the saved .xlsm file (10.72 KB, application/vnd.ms-excel.sheet.macroEnabled.12)
2021-01-27 16:40 UTC, Harald Langheinrich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Langheinrich 2021-01-27 03:21:17 UTC
Description:
I wrote all makro compatible to ms-vba and wanted to save them as *.xlsx file 
all makro are not saved all buttons in the worksheets diappeared

Actual Results:
no error message . But when you open the xlsm.file all makros are vanished

Expected Results:
it should work


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
[Information automatically included from LibreOffice]
Locale: de
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes
Comment 1 Timur 2021-01-27 09:04:48 UTC
Did you search in existing closed and open bugs? 
Many macro bugs, better to keep in some similar,Bug 117266 or other. 
Please attach sample ods.
Comment 2 Harald Langheinrich 2021-01-27 10:19:43 UTC
Created attachment 169177 [details]
ods with macros self starting to page startseite

its not complete at the moment 

for the use with MS-Excel on another computer I should save the file as *.xlsm

somebody referenz me to a similar bug 117266 which is also not solved .

But this guy with this bug has A STRUCTURE IN HIS FILE WHICH is not same which as I know from Excel and I cant even make a structure to load basic and dialogs manually
Comment 3 Harald Langheinrich 2021-01-27 12:34:22 UTC
Created attachment 169181 [details]
selfstarting (opens page Startseite )
Comment 4 Harald Langheinrich 2021-01-27 12:39:10 UTC
Created attachment 169182 [details]
This is the result the xlsx -file
Comment 5 Harald Langheinrich 2021-01-27 16:38:40 UTC
Created attachment 169190 [details]
the original .ods file

i made a more simple file as a sample
Comment 6 Harald Langheinrich 2021-01-27 16:40:04 UTC
Created attachment 169191 [details]
This is the saved .xlsm file

I made the example more simple
Comment 7 Roman Kuznetsov 2021-01-28 11:28:26 UTC
confirm in

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 94f6765d6ecc3145fa2d266231124003cf953118
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

and in 5.2 too
Comment 8 Ezinne 2021-12-13 05:43:34 UTC Comment hidden (obsolete)
Comment 9 Timur 2022-03-21 15:31:28 UTC Comment hidden (obsolete)
Comment 10 Justin L 2022-09-25 02:09:00 UTC
I suppose it is a valid request, but it isn't surprising that it doesn't work this way. We use a different language for our own macros (although as OP noted there is overlap so you could write it compatibly).

I guess the enhancement request is that if there is no VBAProject already in the file, then export the existing stuff as if it was VBAProject code.
Comment 11 Justin L 2022-10-01 02:19:15 UTC
*** Bug 107960 has been marked as a duplicate of this bug. ***
Comment 12 Mike Kaganski 2022-10-01 09:09:51 UTC
(In reply to Justin L from comment #10)
> I guess the enhancement request is that if there is no VBAProject already in
> the file, then export the existing stuff as if it was VBAProject code.

This is not a valid request when worded this way. A valid request would be allowing creation of VBA modules. But pretending that one type of module is another type is not reasonable.
Comment 13 Timur 2022-10-03 09:57:14 UTC
(In reply to Justin L from comment #11)
> *** Bug 107960 has been marked as a duplicate of this bug. ***

Normally, newer bug is marked a duplicate of an older one, unless there's a reason like cluttered olded bug and clean newer one, or bibisected newer one, etc.
Which I don't see here.
Comment 14 m_a_riosv 2022-11-26 23:08:41 UTC Comment hidden (obsolete)