I'm trying to re-do all my formerly Excel tasks in LO-Calc. I'm in the process of making macros in OOBasic that I have had in VBA. I can do most of what I want although I don't really understand the whole Dispatcher thing and "star" and "uno" but whatever.
One thing I could do in VBA was specify a block of ranges like:
But in OOBasic the best I could do is:
Is there a more compact way of doing this?
_________________
Bob Rashkin
One thing I could do in VBA was specify a block of ranges like:
Code:
[b7:g38,h9:h37,i6:i12,i17:i23,j6:j21,k9:l37,m7:m37,o10:o19].ClearContents
But in OOBasic the best I could do is:
Code:
rng1=oSheet.getCellRangeByPosition(1,6,6,38)
rng1.clearContents(com.sun.star.sheet.CellFlags.STRING)
rng1.clearContents(com.sun.star.sheet.CellFlags.VALUE)
rng1=oSheet.getCellRangeByPosition(7,8,7,36)
rng1.clearContents(com.sun.star.sheet.CellFlags.STRING)
rng1.clearContents(com.sun.star.sheet.CellFlags.VALUE)
rng1=oSheet.getCellRangeByPosition(8,5,8,11)
rng1.clearContents(com.sun.star.sheet.CellFlags.STRING)
rng1.clearContents(com.sun.star.sheet.CellFlags.VALUE)
rng1=oSheet.getCellRangeByPosition(8,16,8,22)
rng1.clearContents(com.sun.star.sheet.CellFlags.STRING)
rng1.clearContents(com.sun.star.sheet.CellFlags.VALUE)
rng1=oSheet.getCellRangeByPosition(9,5,9,20)
rng1.clearContents(com.sun.star.sheet.CellFlags.STRING)
rng1.clearContents(com.sun.star.sheet.CellFlags.VALUE)
rng1=oSheet.getCellRangeByPosition(10,8,11,36)
rng1.clearContents(com.sun.star.sheet.CellFlags.STRING)
rng1.clearContents(com.sun.star.sheet.CellFlags.VALUE)
rng1=oSheet.getCellRangeByPosition(12,6,12,36)
rng1.clearContents(com.sun.star.sheet.CellFlags.STRING)
rng1.clearContents(com.sun.star.sheet.CellFlags.VALUE)
Is there a more compact way of doing this?
_________________
Bob Rashkin