How to take new excel file data which is present in share drive not in our solution folder

I need to open all excel files which are present in share drive. Using below code

sharepath = “Its is my shere path location”
fileinfo = New DirectoryInfo(sharePath).GetFiles("*.xlsx").

But it is taking the files from my local solution folder. When I am removing the files from local solution folder. It is giving error… Please help.

1 Like

in your sharepath make sure you’re using the full UNC path for the network drive.

1 Like