Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is what I ended up with. If I had know about the DeleteColumns function, I would have used that.


sub DeleteColumns rem ---------------------------------------------------------------------- rem Manually remove all blank sheets and save *.csv file before starting this. (I can do this automatically now) rem define variables dim document as object dim sheet as object

document = ThisComponent sheet = document.sheets(0)

        sheet.columns.removeByIndex(98, 5)
        sheet.columns.removeByIndex(92, 5)
        sheet.columns.removeByIndex(81, 2)
        sheet.columns.removeByIndex(66, 1)
        sheet.columns.removeByIndex(54, 8)
        sheet.columns.removeByIndex(47, 5)
        sheet.columns.removeByIndex(42, 1)
        sheet.columns.removeByIndex(37, 3)
        sheet.columns.removeByIndex(35, 1)
        sheet.columns.removeByIndex(33, 1)
        sheet.columns.removeByIndex(17, 1)
        sheet.columns.removeByIndex(14, 1)
        sheet.columns.removeByIndex(6,  1)
        sheet.columns.removeByIndex(0,  4)

end sub