How to skip the processing of a file when datasource.notfound in Power Query?

gerotutu

New Member
Joined
Jun 19, 2015
Messages
28
Power Query takes from a cell the path it should go for the source files.

I want to handle the situation when there are no files in that folder or when there isn't any text in the cell referring to the path. The goal is to skip the following steps (or cheat the next steps with an empty table).

I tried, among many things, the functions try... otherwise without success.

This is how my code starts:

Power Query:
let
DataAcesPath = Excel.CurrentWorkbook(){[Name="DataAcesPath"]}[Content][Column1]{0},
Origen = Folder.Files(DataAcesPath) ,
#"Archivos ocultos filtrados1" = Table.SelectRows(Origen, each [Attributes]?[Hidden]? <> true),

Could you please help me out with this?

Many many thanks for your support,
Geronimo
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
There is a “try, otherwise“ approach. It executes the first part unless there is an error, and then it does the second bit (case sensitive)

try ….. otherwise …..
 
Upvote 0

Forum statistics

Threads
1,223,990
Messages
6,175,817
Members
452,672
Latest member
missbanana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top