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

            Bug ID: 153595
           Summary: VBA SaveAs method does not add default file extension
           Product: LibreOffice
           Version: 4.1.0.4 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: implementationError
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]
            Blocks: 108908

This is a continuation of bug 153593

Another issue with the example macro in attachment 185348 is that Excel uses a
default extension if there is none given, but Calc does not:

Sub save_as_file_fp()
    ActiveWorkbook.SaveAs _
    Filename:=Application.ActiveWorkbook.Path & ".\FileSaveTest_fp"
End Sub

With the above macro Excel outputs a "FileSaveTest_fp.xlsm" file (saves the
example file with the new Filename and same format, adding and extension
matching the format) and Calc just "FileSaveTest_fp".

Manually adding an xlsm or xlsx extension, then opening it in Excel gives an
"invalid file" error which is the same as bug 118146.
(Adding an xls extension makes Excel open it fine)

1. Open attachment 185348
2. Run save_as_file_fp()
3. Observe that the created file does not have an xlsm (expected) or any other
file name extension.

How it looks after running it in Excel: attachment 185349
How it looks after running it in Calc: attachment 185352

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6028e9fda96d0ed5da266b1c54a7755f7ba3408c
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

Happens since 4.1, before the SaveAs method was not implemented at all.


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=108908
[Bug 108908] [META] Visual Basic for Applications (VBA) macro issues
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to