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

531
Views
Tableau Server: How to select/include specific sheets from a workbook (for exporting to PDF) *via* script / console / API?

In Tableau Server I'm trying to find a way to select specific sheets from a workbook (for exporting to PDF) via script / browser dev console / tabcmd / URL / API. Here's a real / live example, which can be played around with: https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_sample_export_to_pdf.htm

Exporting specific sheets from Tableau Workbook to PDF

So far I tried, inter alia, various JavaScript commands to get the right element and trigger a "click", but so far to no avail... the underlying *.js files reveal a lot but so far I had no luck in getting the proper handle.

(I managed to give the impression that the sheets were selected, i.e., the checkboxes were shown and ticked via my JavaScript, but that didn't budge the actual selection, e.g. the "2 of 6" in the screenshot above.)


Related links:

  • https://help.tableau.com/current/server/en-us/tabcmd_cmd.htm#id7cb8d032-a4ff-43da-9990-15bdfe64bcd0
  • Export a specific sheet from Tableau using tabcmd
  • TabPy (Tableau) how to automate producing pdfs from a workbook
  • https://community.tableau.com/s/question/0D54T00001HuPQSSA3/how-to-set-default-options-for-showexportpdfdialog-?_ga=2.20070778.390974142.1655121966-1741765833.1651754073&_gac=1.204654884.1654237999.EAIaIQobChMI9oaVytSQ-AIVtRSLCh0gNw-xEAEYASAAEgLApvD_BwE (Q: Ideally, I would also like to pre-select certain sheets for the user as well. -- A: I don't think it is possible using the javascript api.)
  • https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_ref.htm
  • https://www.tableau.com/developer/tools
about 4 years ago · Santiago Gelvez
2 answers
Answer question

0

One approach (there might be much better ones...), which works for here:

const bla = document.getElementsByClassName('thumbnail-wrapper_f1gupj42')
bla[1].click()

That toggles the checkbox on the "College" sheet above :-)

about 4 years ago · Santiago Gelvez Report

0

A solution which worked (not only worked in the API but also in my use case) is recording a puppeteer script and using the keyboard only (e.g. Tab, Enter, etc) to select the individual pages; recording mouse clicks did not work that well, but who needs a mouse anyway?

about 4 years ago · Santiago Gelvez 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!