Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

macro to remove bold from a particular range in all sheets

Hello. I am trying to write a macro using LibO 4.4.3 on Linux 64 bit.

In the 14th column of all sheets, from rows 4 to 45, it should make only the cells with content "अमावास्या" and "पौर्णमासी" bold and remove bold from all other cells. However, I am totally stumped as to how to access the font etc attributes from BASIC. Please help!

This is my attempt going as far as getting the requisite cell object but after that I'm at a loss:

sub boldenPurniAma
    sheets = ThisComponent.Sheets
    for each sheet in sheets
        for row = 4 to 45
            c = sheet.getCellByPosition(14,row)
            ' what should I do here?
        next row
    next sheet
end sub

Thanks!

macro to remove bold from a particular range in all sheets

Hello. I am trying to write a macro using LibO 4.4.3 on Linux 64 bit.

In the 14th column of all sheets, from rows 4 to 45, it should make only the cells with content "अमावास्या" and "पौर्णमासी" bold and remove bold from all other cells. However, I am totally stumped as to how to access the font etc attributes from BASIC. Please help!

This is my attempt going as far as getting the requisite cell object but after that I'm at a loss:

sub boldenPurniAma
    sheets = ThisComponent.Sheets
    for each sheet in sheets
        for row = 4 to 45
            c = sheet.getCellByPosition(14,row)
            ' what should I do here?
        next row
    next sheet
end sub

Thanks!