Sparrow
Sparrow

Reputation: 15

How to get all the workbooks in project in Tableau

I am using TableauServerClient. My code :

all_workbooks,pagination_item=server.workbook.get()
for wb in all_workbooks:
 print(wb.name)

It prints all the workbooks in server(From all projects).I need to print only workbooks present in particular Project(i know the Project name and id)

Upvotes: 0

Views: 1533

Answers (1)

Bernardo
Bernardo

Reputation: 3318

The workbooks object contains project information according to the docs.

Something like this should work:

all_workbooks,pagination_item=server.workbook.get()
for wb in all_workbooks:
    if wb.project_name == "YOUR PROJECT NAME":
        print(wb.name)

Upvotes: 1

Related Questions