Hi all. I cant seem to think of a solution for this. What I want is to put the file path into the specific cells as what i have shared in the screenshot below as an example.
So if the file path is a PI_Report_Purchaser, i want the file path for that pdf to be under B2, then skip PI_Report_Vendor if none then input in the file path for PO_Report_Purchaser if there is etc. After that it will go down to Lawfirm 2 and do the same thing.
As of now, I only managed to extract all the file paths from the folder and write in 1 column. Any ideas of how to go about doing the above? Do i have to use IF condition? Thank you in advance!
Hi @lyn89 ,
Is the first column is pre defined?
Create a datatable for the above excel with the same column names. Open for each data row loop and check with If condition. Assign the value to row.
Yes, the data in the first column are predefined as the data is extracted from a website. Do I have to include the first column in the data table as well? Sorry im new to uipath
Hi @lyn89 ,
You can create the datatable before datascarping and just save the scraped data into this table.
Then open for each row loop and do the next steps. See the below sample.
i actually have quite alot done before i reached this part… so was thinking of just adding the next few columns next to the first column… so it’s like adding on to existing data in the excel…
Hope this helpsForum_Solution.zip (7.7 KB)
If you cant change the structure at this point of your development then you can do add column activity or create a new datatable with all the columns. Then run for each row for your existing datatable and get all the values. Then do “Add Data Row” activity.
hi @Boopathi.M thanks so much for the file! It seems to be what i wanted but i get this error msg when i tried to assign in IF condition. How do i convert the file path value to String?
this is the screenshot for how i get the file path values
Use foreach loop and extract file name
Attached a test xaml for your referenceGetFileName_MoveFile.xaml (6.0 KB)
Hope it solves your logic.
i tested out the flow you suggested but im getting this error msg… can you advise? thank you
It is working fine in my environment by extracting the Code from the text file and writing into an excel.
Also attached the final code for your reference.
Could you please debug and share the screenshot on which activity it throws that exception.
BoopathiExtractTextFromSubFolders.zip (14.9 KB)
i dont really understand the latest code that you attached… doesn’t seem to be the flow which you shared with me previously… pls refer to screenshot below after i debug it
From screenshot, it looks that you have currentrow(str_rowvalue) but the variable str_rowvalue contains file path…you need to give the column name variable.
Please check the value in watch panel