Access PivotTable Settings #1456
Replies: 6 comments 8 replies
-
Sounds interesting. Try getting the "excel package" it gives you access to the Excel object model. You can navigate to the Pivot Table thru the collections I believe. You can do this debugging a ps1 file on a test xlsx. Once you find the Pivot Table you can use Many are not settable via just the xlsx file for various reasons. In the examples folder and tests there is code that manipulates the pivot tables. Some settings were done but that was adhoc and a while when folks asked about them. |
Beta Was this translation helpful? Give feedback.
-
Thanks Doug, Todd |
Beta Was this translation helpful? Give feedback.
-
Hi Doug, I didn't have much time today to work on this but I was able to find something close to what I'm trying to change.. $xl = open-excelpackage -path $xlfile $xl.workbook.worksheets[3].PivotTables[0].rowfields[0].Compact unfortunately the value I'm looking for is "tabular" which doesn't exist. I suspect it's a combination of "Compact" & "Outline" settings. Currently both are set to $false. So far I've struck out trying to change either of the values. I guess that will be to figure out next week! Todd |
Beta Was this translation helpful? Give feedback.
-
Got it. PivotTables are a strange beast. I have not tried this in Excel or with the module. Any chance you could create a "safe" version of the code. Also, sometimes Googling for these and using Another thought. I sometimes record a macro and then manipulate the PivotTable. Then I examine the VBA it generates. |
Beta Was this translation helpful? Give feedback.
-
Hi Doug, I appreciate you taking the time to reply but I'm just going to live with the std pivot layout. |
Beta Was this translation helpful? Give feedback.
-
I have an existing "template" xlsx with one worksheet for data and one worksheet with a pivot predefined. |
Beta Was this translation helpful? Give feedback.
-
I'm gathering large quantities of data from REST API queries (~10-20 columns with up to 25,000 rows) and outputting to Excel. So far ImportExcel has made this an almost trivial process. I have setup several different Pivot Tables to make data analysis a more practical undertaking. Again, fairly trivial. However, I've run into 2 settings I cannot figure out how to access.
Does anyone know if/how I can access these settings?
Thanks,
Todd
P.S. I know this amount of data is better suited to a DB but unfortunately that isn't an option at this time.
Beta Was this translation helpful? Give feedback.
All reactions