Need LO BASIC Reference for Cell & Sheet Properties

I wrote my first Calc macro today (and yesterday) and was immensely frustrated at not finding a reference source for the cell and sheet object properties. I am attempting to create a blank sheet and copy its general framework from another sheet in the same .xlsx file. Fortunately, Record Macro helped my create the new sheet (or I would have been completely lost), but was ineffective at dealing with any formatting. I realize the Record feature is acknowledged as very unreliable.

I was able to get data copied from the reference sheet with .formula and I finally found the right property names to get these cell formatting attributes (though the naming choices seems wildly divergent from broader practice):

Cell1 = Sheet1.GetCellbyPosition(iCol, iRow)
Cell2 = Sheet2.GetCellbyPosition(iCol, iRow)
Cell2.Formula       = Cell1.Formula
Cell2.CharFont      = Cell1.CharFont
Cell2.CharHeight    = Cell1.CharHeight	'font size
Cell2.CharWeight    = Cell1.CharWeight	'+/- bold
Cell2.CharPosture   = Cell1.CharPosture	'+/- italic
Cell2.CharUnderline = Cell1.CharUnderline	'+/- underscore
Cell2.NumberFormat  = Cell1.NumberFormat

It took me many hours to ferret out the arcane property names and I still have quite a few yet to resolve, including:

How to set column widths from template sheet.
How to set row heights from template sheet.
How to set cell WrapText property from template sheet.
How to set cell text justification (left, right, center) from template sheet.
How to set page orientation (portrait/landscape) from template sheet.
How to set page header on/off from template sheet.
How to set page margin from template sheet.
How to set fit-to-page from template sheet.

So here’s my question: Where can I find a reference document for LO Calc version 4 that shows the cell and sheet property names?

It doesn’t have to be fancy.

Thanks.

There are documents to help at The Document Foundation page on Macros. The full api is available at the Libre Office API web site. If you want to see examples then Basic examples should help in the first instance.

I found that the best reference is Andrew Pitonyak’s book available via The Document Foundation page on Macros. The biggest help while coding is the X-ray tool mentioned on the same page. It saves hours of searching for what is available.

I have just noted the date on this question and can only apologise for not noticing this before. I hope you have managed to find your answer by now. I have answered this so that everything is there for others researching the same question.

“I found that the best reference is Andrew Pitonyak’s book available via The Document Foundation page on Macros. The biggest help while coding is the X-ray tool mentioned on the same page. It saves hours of searching for what is available”

I couldn’t get anywhere with the X-RAY link this seems to refer to. Perhaps it’s out of date. Neither could I find a comprehensive reference in Andrew’s book “Macros Explained”, but then maybe I’m looking in the wrong place.

It might be that you didn’t swallow completely the most important role of the API in custom programming for LibreOffice. In Excel-VBA nearly(?) every subcomponent (object) living in the document is mapped to something looking roughly like elements of the language Basic (VBA). For LibO Basic is just a (simple!) programming language, and relevant things need to be done via the ApplicationProgrammingInterface. Only very few objects and structures are “integrated” in Basic.