Common path to read and write Excel

Hi Everyone - I have one question regarding read and write of excel. We use Excel Application Scope to read and write range activity and we give path of file to read and write. Doing this only I can read and write the file. If I share the code with other person he is not able to execute the same code because of file path and he has to change the path. But if this is a big code and path is mentioned many times then other person can miss to update it.

Do we have an option to create a path so that everyone can use the code without doing any change. Considering other person also save the file at same location as mine and with same name.

If it has a solution please suggest and if possible please share code snippet or .xaml file.

Waiting for your reply. Thanks…

Hi @navincemk,

  1. Save your file in a folder within your project folder for example Input.
  2. In the excel application scope the file path should be “Input\yourexcelfile.xlsx”
  3. When sharing the code to your colleague send the whole project file containing the Input folder. This way he wont have to rename the excel file path