0
0
Tableaubi_tool~10 mins

Excel and CSV connections in Tableau - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to connect Tableau to an Excel file named 'SalesData.xlsx'.

Tableau
excel_connection = tableau.connect_to_file('[1]')
Drag options to blanks, or click blank then click option'
ASalesData.xlsx
BSalesData.csv
CSalesData.txt
DSalesData.json
Attempts:
3 left
💡 Hint
Common Mistakes
Using a CSV file extension instead of Excel.
Typing the wrong file name or extension.
2fill in blank
medium

Complete the code to load data from a CSV file named 'CustomerData.csv' in Tableau.

Tableau
csv_connection = tableau.connect_to_file('[1]')
Drag options to blanks, or click blank then click option'
ACustomerData.xlsx
BCustomerData.json
CCustomerData.csv
DCustomerData.xls
Attempts:
3 left
💡 Hint
Common Mistakes
Using Excel file extensions instead of CSV.
Misspelling the file name.
3fill in blank
hard

Fix the error in the code to correctly connect to an Excel file named 'Inventory.xlsx'.

Tableau
connection = tableau.connect_to_file('Inventory[1]')
Drag options to blanks, or click blank then click option'
A.csv
B.txt
C.xls
D.xlsx
Attempts:
3 left
💡 Hint
Common Mistakes
Using older Excel extension .xls instead of .xlsx.
Using CSV or text file extensions by mistake.
4fill in blank
hard

Complete the code to load data from 'Orders.csv' and specify the delimiter as a comma.

Tableau
csv_connection = tableau.connect_to_file('[1]', delimiter=',')
Drag options to blanks, or click blank then click option'
AOrders.csv
B;
C,
DOrders.xlsx
Attempts:
3 left
💡 Hint
Common Mistakes
Using Excel file name instead of CSV.
Using semicolon as delimiter when comma is needed.
5fill in blank
hard

Fill all three blanks to connect to 'DataExport.xlsx', select the sheet named 'Sheet1', and load it into Tableau.

Tableau
excel_connection = tableau.connect_to_file('[1]')
sheet = excel_connection.get_sheet('[2]')
data = sheet.[3]()
Drag options to blanks, or click blank then click option'
ADataExport.xlsx
BSheet1
Cload_data
Dread
Efetch
FDataExport.csv
Attempts:
3 left
💡 Hint
Common Mistakes
Using CSV file name instead of Excel.
Using wrong sheet name or misspelling it.
Using incorrect method name to load data.