How to select the excel with part name variable?

Hi all,
How to select the excel with part name variable?
the date of the excel name “invoice_20230409.xlsx” will change every time. Is there an expression like
“invoice_”&“*”&“.xlsx”?

Hi @jackie.yue

Try this.

Directory.GetFiles(FolderPath,“Invoice_*.xlsx”)

You will get array of all file paths of files with that keyword.

You can use this too:

image

Hope it helps.

2 Likes

Thanks Harshith. There is only one excel with part name variable. How to choose it?

Directory.GetFiles(FolderPath,“Invoice_*.xlsx”)(0)

Try this.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.