Cannot find the excel file in test environment while i can see the bot is saving the file in dev environment

Bot reading mail and storing data in excel. But i see that when i run in studio, file is saved but after publishing in test environment file is not found in test environment.
Anyone know what is the problem.
Thanks in advance


Where are you saving the file?

If its in project folders then it will be in c:\users\username\.nuget\packages\package name

Its not advised to save in project folders use absolute path and check


@aslam_ali1 ,
If you are storing files in your local PC or project folder, please configure this path so you can call it correctly
Better yet, you can use the “path exist” activity to check

Add a log message activity printing the full path where bot is saving the file to see what is the problem with the path

in log im getting this path.
C:\Users\RPA2.nuget\packages\test.excel.file.upload\1.0.14\content\Data\Data Sheet.xlsx
but this is not available in local machine

Yes, this location is about the user used in test environment.

When you saving the excel file, you can use relative path instead absolute path

“Data/Data Sheet.xlsx”

Then make sure the Excel file is saving correctly, for this you can use File Exists that works for both absolute path and relative path (project folder)

Thanks @rikulsilva for your quick response.
initially i used relative path but cannot find any file in the test environment.

1 Like

Hi @aslam_ali1

Better to save the file in the Shared Drive which is accessible across all the environment. Or something like create a folder in C drive to store the report across all the environment. So even when you move from Test to prod you will not face this issue.

Hope this helps :slight_smile:

1 Like

in this case, the Excel file is not been saving in your test environment. Are you running you bot from orchestrator ?

I totally agree with @AJ_Ask, it much better you define a common location for your files that is equal for all your environment or you can change it from asset, for example

But if you want to do more troubleshooting, you can add the Write Range activity inside a Try Catch activity and in Catches block, you add log to see with something going wrong when bot is saving the Excel file


Thanks @Anil_G i found the files in Project folder because i had given Relative Path.

After giving absolute path i can store it wherever i want and easy to find.

1 Like

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