Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello community,
Is there a way to use Power Query to extract only data from the same workbook where all the sheets names begin with "rec_" for instance?
Thanks in advance
Solved! Go to Solution.
Sure:
let
    Source = Excel.Workbook(File.Contents("<YourPathAndFileName"), null, true),
    #"Filtered Rows" = Table.SelectRows(Source, each [Kind] = "Sheet" and Text.StartsWith([Item], "rec_"))
in
    #"Filtered Rows"
					
				
			
			
				Sure:
let
    Source = Excel.Workbook(File.Contents("<YourPathAndFileName"), null, true),
    #"Filtered Rows" = Table.SelectRows(Source, each [Kind] = "Sheet" and Text.StartsWith([Item], "rec_"))
in
    #"Filtered Rows"
					
				
			
			
				Hello,
I find that this does not work if the file lives in a OneDrive folder synced to the PC. I works fine with the path
= Excel.Workbook(File.Contents("C:\stuff\Book1.xlsx"), null, true)
but with the path C:\Users\user\OneDrive\Forums\filename.xlsx it throws an error "The process cannot access the file because it is being used by another process."
How can it be made to work for OneDrive stored files?
Thank you
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 88 | |
| 49 | |
| 37 | |
| 31 | |
| 30 |