I am working on a large customizable spreadsheet for numerous independent contractors in a specified field. Due to the nature of the business, and how there are a lot of niche variables to it, each person basically requires their own customization. As such, obviously, the Calc workbook has tons of customizable variables. I have a sheet called ‘Setup’, where we can enter in a lot of the customized variables, and it will import them over to the other sheets to be actually utilize as spreadsheets and calculations. I am trying to enable a button on the ‘Setup’ worksheet that will check all of the cell G2:AE2 on worksheet ‘Job Details’ and if they are blank, hide their respective Column on ‘Job Details’ worksheet. Maybe I am tired, rusty on macros, or just overthinking it, but I cannot seem to get it to function. Pointers for my blonde self?
are they really »blank« ? ⇓⇓
its python:
def hide_blank(*_):
doc = XSCRIPTCONTEXT.getDocument()
row = doc.Sheets["Job Details"]["G2:AE2"]
for empty in row.queryEmptyCells():
empty.Columns.IsVisible = False
1 Like