Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index

Another hint, which you'll also find sooner or later when following the
link I provided, is the Xray tool. It's great for investigating objects.

I went the other way around, I started writing macros in
Calc (then LibreOffice Calc, then Apache OpenOffice and now LibreOffice
Calc again) and now I'm also writing macros in Excel at work (I run 100 %
Linux at home so no Excel there). There are some similarities but the
differences are also huge. Some things are easier in Excel and some things
are easier in LibreOffice/Apache OpenOffice.

Here are some really basic examples about working vill cell values:
Option Explicit

Dim MyString As String, Col As Long, Row As Long
' You can refer to sheets and cells by names or position. the following two
lines can be equivalent:

' The other way around:

Also available are .setFormula(), .setValue(), getFormula() and getValue().

Of course you can make the lines shorted like these examples:

' Example 1
Dim Sheet As Object, Cell As Object

' Example 2
Dim MyFormula As String
With ThisComponent.Sheets.getByName("Data")
End With

Kind regards

Johnny Rosenberg

2017-04-20 22:53 GMT+02:00 Johnny Rosenberg <>:

2017-04-18 15:40 GMT+02:00 Martini <>:


First of all, I'm using libreoffice 5.2.6.

I've made some macros with Excel in my days but never used Calc and never
interfaced with another application (Word or Writer) so I'm pretty lost

I'd like to generate a text document using data from Calc.
Here's an anonymized example of a Calc file:
Here is the end result Id like to generate:

You can see column BCDE are meant to be a sort of paragraph header, F2:M2
are to be included if the cell is ticked, N contains a brief explanation
the case.

Again, never used Calc for macros so I'll need basic training

Thanks for your help.

I would start by visiting this page:

Kind regards

Johnny Rosenberg

View this message in context: http://nabble.documentfoundati
Sent from the Users mailing list archive at

To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be

To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.