[Libreoffice-bugs] [Bug 118247] New: FILEOPEN XLSX Basic code with SpecialCells(xlCellTypeConstants, 1) range method is ignored

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Jun 19 16:37:38 UTC 2018


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

            Bug ID: 118247
           Summary: FILEOPEN XLSX Basic code with
                    SpecialCells(xlCellTypeConstants, 1) range method is
                    ignored
           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 142932
  --> https://bugs.documentfoundation.org/attachment.cgi?id=142932&action=edit
Example file from Excel

If we use XlSpecialCells range method in visual basic code created by Microsoft
Excel 2013/2016, and open with LibreOffice Calc and run the macro, the
“SpecialCells(xlCellTypeConstants, 1)” method is ignored.

Steps to reproduce:
1. Create a new spreadsheet with Microsoft Excel 2016/2013
2. Fill a range (for example A1:V30) with numbers and letters
3. Open the Visual Basic window
3. Add a new Module to your VBAProject
4. Copy this VBA code to your module:

Sub kijeloles_adatok()
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.SpecialCells(xlCellTypeConstants, 1).Select
With Selection.Interior
    .Pattern = xlSolid
    .Color = 5287936
End With
ActiveSheet.Range("A1").Select
End Sub

5. Save the file as *.xlsm
6. Open the file in LibreOffice Calc and run the macro.


Actual results:
The macro is run without an error, but the
Selection.SpecialCells(xlCellTypeConstants, 1) method was ignored. Instead of
filling the numbers with color the macro fills all the range with color.

Expected results:
The SpecialCells(xlCellTypeConstants, 1) method should work correctly.


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/ff8be8fe/attachment.html>


More information about the Libreoffice-bugs mailing list