SOLVED

[SOLVED] Power Query - Try don't work with Folder.Files

Copper Contributor

Oi pessoal!

 

Esta é minha primeira discussão, então eu tenho um problema ao tentar carregar pastas diferentes (no OneDrive) no Power query Excel. Usei a instrução try para corrigir isso, tentando abrir duas pastas diferentes, mas não funcionou. Ela não retorna um registro com os campos [HasError] e [Erro / Valor] para mim.

 

Desde já, obrigado.

2 Replies
best response confirmed by CaioSilva (Copper Contributor)
Solution
Guys, i solved this using a following statement:

Source = try Table.Buffer(Folder.Files(AnyPathHere)) otherwise Folder.Files(OtherAnyPathHere)).

Using Table.Buffer the try statement works again.
Can confirm, I had queries that would get corrupted just because Windows display language was different between users. It just saved me a ton of work and now anyone can refresh said queries.
1 best response

Accepted Solutions
best response confirmed by CaioSilva (Copper Contributor)
Solution
Guys, i solved this using a following statement:

Source = try Table.Buffer(Folder.Files(AnyPathHere)) otherwise Folder.Files(OtherAnyPathHere)).

Using Table.Buffer the try statement works again.

View solution in original post