Return dynamic filename opened from excel scope

Hi Everyone.

I want to return dynamic filename which opened from Excel application scope or read workbook … But the filename has dynamic name such as ( file1_DateTime.Now.ToString(“ddMMyyyy_hhmmss”).xlsx )… The “ddMMyyyy_hhmmss” always be changed.

How to do got that filename after open it.

Thanks in advance!

Hi @Mr.H,

Do you want a dynamic filename from the folder?

1 Like

@Mr.H,

// Create String variable and store that path in.
String strFilePath = “C:\Mr.H\file1_DateTime.Now.ToString(“ddMMyyyy_hhmmss”).xlsx”
// Use strFilePath variable in excel appl scope.
// you can return same value which is in strFilePath

Does it make sense?

Thanks you bro!

1 Like

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