[Libreoffice-bugs] [Bug 118246] New: FILEOPEN XLSX Basic code with “GetOpenFilename” method does not work

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Jun 19 16:18:08 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=118246

            Bug ID: 118246
           Summary: FILEOPEN XLSX Basic code with “GetOpenFilename” method
                    does not work
           Product: LibreOffice
           Version: 6.2.0.0.alpha0+ Master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: kelemeng at ubuntu.com

Created attachment 142930
  --> https://bugs.documentfoundation.org/attachment.cgi?id=142930&action=edit
Example file from Excel

If we try to run this simple “open file dialog” macro in LibreOffice Calc,
which is in the attached file, we got an error code('423' GetOpenFilename). The
main reason of this error is that LibreOffice uses another File selection
dialog method: CreateUnoService("com.sun.star.ui.dialogs.FilePicker")

Steps to reproduce:
1. Create a new spreadsheet with Microsoft Excel 2016/2013
2. Open the Visual Basic window
3. Add a new Module to your VBAProject
4. Use this simple code:
Sub getFileName()
Dim filename As String
filename = Application.GetOpenFilename()
MsgBox filename
End Sub
5. Save the file as *.xlsm
7. Open the file with LibreOffice Calc. Run the macro.

Actual results: The file dialog is opened in Microsoft Office Excel, but If We
use this “GetOpenFilename” method in LibreOffice Calc, we get an error message.
If we use the LibreOffice module
CreateUnoService("com.sun.star.ui.dialogs.FilePicker") we don’t gt an error
message.

Expected results:
We should not get an error message if we use the “GetOpenFilename” method.


Version: 6.0.0.0.beta1+
Build ID: 29228e83df009cf76ac819ed024527be1092f065
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86 at 42, Branch:libreoffice-6-0, Time: 2017-12-04_23:15:34
Locale: hu-HU (hu_HU); Calc: group threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180619/cf960a2e/attachment.html>


More information about the Libreoffice-bugs mailing list