Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

101
Views
How to get the Pivot table name and pivot field name of the selected or active cell using Excel JavaScript API?

I am new to Excel JavaScript API.

My question is

How to get the Pivot table name and pivot field name of the selected or active cell using Excel JavaScript API?

how to get the same result with excel JS as we are getting from the below VBA code?

Sub GetPivotName()

Range("C2") = ActiveCell.PivotTable.Name

End Sub

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Have you tried Range.getPivotTables API to get the pivot tables? In the link there's also a piece of example code.

To get pivot fields, currently as far as I know you'll have to iterate through all pivot fields in the pivot tables to find out (via PivotHierarchy, as demonstrated here). As someone else has asked in Excel Range.PivotField equivalent for JavaScript API, currently there isn't a JS equivalent of Range.PivotField in VBA. If you'd like to request for this feature, please feel free to post it to Microsoft 365 Developer Platform Ideas Forum.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!