Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
umtkyn
Regular Visitor

list all tables' names dynamically

hi,

 

Is there a way to create a list of all tables' names dynamically in an excel file with powerquery ?

 

Thanks,

1 ACCEPTED SOLUTION
AntrikshSharma
Super User
Super User

@umtkyn You can use the path of the current file and then filter for Tables.

 

let
    Source = Excel.Workbook ( File.Contents ( "C:\Users\antsharma\Downloads\1.xlsx" ) ),
    TableNames = Table.SelectRows ( Source, each [Kind] = "Table" )[[Name]]
in
    TableNames

 

View solution in original post

3 REPLIES 3
umtkyn
Regular Visitor

thank you, i was actually trying to append all the tables in it and i found a solution... for future reference i write it also here...

 

 

Source = Excel.Workbook(File.Contents("C:\Users\777\filename.xlsx"), null, true),
#"Filtered Rows" = Table.SelectRows(Source, each ([Kind] = "Table")),
CombineTable= Table.Combine(#"Filtered Rows"[Data])

 

 

AntrikshSharma
Super User
Super User

@umtkyn You can use the path of the current file and then filter for Tables.

 

let
    Source = Excel.Workbook ( File.Contents ( "C:\Users\antsharma\Downloads\1.xlsx" ) ),
    TableNames = Table.SelectRows ( Source, each [Kind] = "Table" )[[Name]]
in
    TableNames

 

how do you manage if you need to do it in the same file ?  

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.