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.
// 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