Skip to content

Instantly share code, notes, and snippets.

@tahasonmez
Created January 1, 2020 21:50
Show Gist options
  • Save tahasonmez/29e7066dfcfba71c847225f897e25aa0 to your computer and use it in GitHub Desktop.
Save tahasonmez/29e7066dfcfba71c847225f897e25aa0 to your computer and use it in GitHub Desktop.
Blue Prism MS Excel VBO - Pivot Table Report Layout Design
dim wb, ws, excel, sheet, PtvTbl as Object
Try
wb = GetWorkbook(Handle, Workbook)
ws = GetWorksheet(Handle, Workbook, Worksheet)
wb.Activate()
ws.Activate()
excel = ws.Application
sheet = excel.ActiveSheet
PvtTbl = ws.PivotTables(PivotTableName)
' For tabular design
PvtTbl.RowAxisLayout(1)
' For compact design
' PvtTbl.RowAxisLayout(0)
Success = True
Catch e As Exception
Success = False
Message = e.Message()
Finally
PvtTbl = Nothing
ws = Nothing
End Try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment