Excel on-line, Pivot Table, Office Scripts

Anonymous
2023-01-24T22:05:47+00:00

I'm new to Excel on-line. I'm writing an Office Scripts and want to remove the entire Data Hierarchy before I add back the ones the users are requesting from a dropdown. I cannot figure out how to remove all of the existing ones. I found this: removeDataHierarchy(DataPivotHierarchy: DataPivotHierarchy): void; but I need a sample of code to figure it out. Can anyone help me with this?

Thank you

Microsoft 365 and Office | Excel | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-01-25T16:30:42+00:00

    Thank you so much!!!

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-01-25T02:04:47+00:00

    Dear Jenny,

    Good day! Thank you for posting to Microsoft Community.

    As per your description, it seems that you are trying to use Office scripts to remove the entire Data Hierarchy in Excel Online.

    If my understanding is right, we've found a related article in **** GitHub **** for your reference.

    If the issue still persists, considering that we mainly focus on Office general and build-in queries, for Office script related queries we have a dedicated channel Microsoft Q&A Community.

    For you to be assisted properly, we sincerely recommend you go to that community and post a new thread. You may use "office development" tag when asking a question as shown below.

    Members and engineers over there are proficient in the knowledge of Office scripts queries. They will focus on the specific situation on your side and share suggestions for you.

    Image

    Your understanding and patience will be highly appreciated. I hope that you are keeping safe and well!

    Sincerely,

    Rhoda | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments