Bug 118153 - FILEOPEN VBA Macro:“Workbooks.Open Filename” command does not work
Summary: FILEOPEN VBA Macro:“Workbooks.Open Filename” command does not work
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.0.4.2 release
Hardware: All All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: target:6.2.0 target:6.1.0.2
Keywords:
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
 
Reported: 2018-06-14 08:04 UTC by Gabor Kelemen (allotropia)
Modified: 2018-10-03 16:53 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Excel (15.54 KB, application/vnd.ms-excel.sheet.macroEnabled.12)
2018-06-14 08:04 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the error message (63.13 KB, image/png)
2018-06-14 08:04 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2018-06-14 08:04:25 UTC
Created attachment 142718 [details]
Example file from Excel

The ‘Workbooks.Open Filename:="FILE PATH"’ command does not work in LibreOffice if the file extension is *.xlsx in the FILE PATH. If the file extension is *.xls the command works correctly.

Steps to reproduce:
1. Create a new *.xlsm file with Microsoft Excel 2010/2013/2016.
2. Create a new module in the VBA Project.
3. Use this command: ‘Workbooks.Open Filename:="FILE PATH"’ with *.xlsx and *.xls files in the “FILE PATH”
4. Save the file and open with LibreOffice Calc
5. Try the macro in both cases. (FILE PATH with *.xlsx and *.xls)


Actual results:
We got an error message (Type: com.sun.star.uno.RuntimeException Message: Bad Format) in case of *.xlsx extension, but not in case of *.xls extension.

Expected results:
We should not get an error message (Type: com.sun.star.uno.RuntimeException Message: Bad Format) in case of *.xlsx extension.


Verzió: 6.0.4.2
Build az.: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
CPU szálak: 4; OS: Windows 10.0; Felületmegjelenítés: GL; 
Területi beállítások: hu-HU (hu_HU); Calc: CL

Version: 6.2.0.0.alpha0+
Build ID: 1e9e01dff0a8d65bb10d5a886cca7899b43979da
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-05-27_05:50:28
Locale: hu-HU (hu_HU); Calc: group threaded
Comment 1 Gabor Kelemen (allotropia) 2018-06-14 08:04:46 UTC
Created attachment 142719 [details]
Screenshot of the error message
Comment 2 raal 2018-06-14 17:33:22 UTC
Confirm.
Comment 3 Commit Notification 2018-07-06 16:15:21 UTC
bvarga91 committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fc434c8fd62ccb6d083af075f1ab83da6bd76b8d

tdf#118153 VBA Macro: add XLSX support to Workbooks.Open

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2018-07-10 00:21:43 UTC
bvarga91 committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9837faeaab59e030e500ed21da92dd6bed2806fe&h=libreoffice-6-1

tdf#118153 VBA Macro: add XLSX support to Workbooks.Open

It will be available in 6.1.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 raal 2018-10-03 16:53:57 UTC
Verified. Version: 6.2.0.0.alpha0+
Build ID: 75a48e37b260c145297261d0e0ab5720894404f1
CPU threads: 4; OS: Windows 6.1; UI render: default;