This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
This is because xls files are legacy at this point and use old Microsoft drivers. The method for determining the tabs from these files is found in the supporting files folder using the VBScript file ExcelTabsScript.vbs in the run tool.
If you just use the "Read All Excel Files" Macro and don't change anything in it, it actually includes the FileName which has the sheet names as well. To keep things simple it might be easiest to just use the macro and do a summarize on the FileName field in order to get the list of paths and sheet names.
Another option would be to use Python with the xlrd library. The path to the Excel file can be supplied from an incoming tool (shown in example) or hard-coded in the Python code. The code could also be modified to take in/process multiple files.
from ayx import Package Package.installPackages('xlrd')
from ayx import Alteryx import xlrd import pandas as pd
# Read in the first cell inputfile = Alteryx.read("#1").iloc
# Open Excel file wb = xlrd.open_workbook(filename=inputfile)
# Get the sheet names and send out Alteryx.write(pd.DataFrame(wb.sheet_names(), columns=['TabName']),1)