Scraped data is not found if robot is published and run from UiPath Assistant

Hi, I’ve a bot that scrapes data and creates an excel file with the scraped data and saves it in a folder. When I run it from main.xaml file it works smoothly.

But when i publish it in the UiPath assistant, the bot is run successfully but the scraped data excel file is not found in the robot folder. Rather the scrapes excel file is found in the .nuget path folder.

Any idea how move the scraped excel file from the .nuget path folder to the actual robot folder? Thanks in advance.

Hello @novdoc23 ,

What you can do is specifically provide the folder path. I hope in your case you are using the default project path. Instead of that if you want to keep the files to a particular folder, provide the full path.

Either you can use an Asset and there you can keep the folder path.

Hi @Rahul_Unnikrishnan

I’ve tried by giving the full path but still it is not saving the file in the main project folder rather it is saving the file in the .nuget path folder

for write what activity you are using ?
do you published properly ?

The UiAssistant bot will use the nuget package to run the bot, not the source files you use to build the bot (i.e. main.xml in your project folder), hence why it is saving it there.

Can you share the filepath you are trying to save the excel file down to?

Hi @TimK

I’m trying to save the scraped data in the below path

“C:\Users\USER\Desktop\Fiverr\data scraper\final data scraper\Scraped data\scraped data.xlsx”

Here the portion "C:\Users\USER\Desktop\Fiverr\data scraper\final data scraper" is saved in a variable (variable1) and portion “Scraped data\scraped data.xlsx” is saved in a variable (variable2)

Finally i created another variable (variable3) as variable3 = variable1+variable2 and then passing the variable3 as write range file path for saving the data.

But still the bot is saving the scraped data in the nuget folder when run from robot tray.

Hi @Veera_Raj

I’m using write range (workbook) activity for writing the data and yes the robot publish was all okay.

may be your given path is not valid

try to add logs before write then you can see where file is actually trying to save

This means your final path is missing the \ between “final data scraper” and “Scraped data”

The path you get out of the above would be:

C:\Users\USER\Desktop\Fiverr\data scraper\final data scraperScraped data\scraped data.xlsx

1 Like

@novdoc23

Another option is to use Path.Combine(Var1,Var2) - this would add in the missing \

Also - the bold USER part of the path - is that dynamic / could that change depending on the person running it on their machine?

1 Like