Merge File Name into Data Table

Hello Team,

I have table in pdf, which I have tried to scrap, it is getting scrapped successfully, but the issue is I also want to add pdf file name along with each row in that scrapped in data table.

For Example : if there are 3 rows scrapped, I want to add pdf file name to all that rows, so that means, If scrapped data table have 3 columns so along with that columns I need one more column of file name and file name should be added for all that rows.

Can anybody please help. Thanks in Advance.

i hope the table in pdf is extracted as datatable
Use add data column activity for adding new column and there is default option in the properties where you can specify the pdf name

Yes output is coming in Data table, Do I need to use add data column activity in for each loop or outside the loop

Outside loop should be fine

@Pramod_Bharat_Mangale

Try this workflow:
Sequence.xaml (10.2 KB)

you will get the file name by Using this expression

Path.GetFileName("Input_File path")

@Pramod_Bharat_Mangale The columns might vary dynamically. For now it has 3 columns but for another case it might have less or more columns. The below workflow can handle such type of scenarios

Example.zip (3.6 KB)

It is Working

It is working, but the thing is, i am getting error like filename column already exist in data table, how to deal with it, i am doing this activity for multiple pdf saved in one folder

My guess is i have kept that activity in loop so after completing one pdf it is going to another pdf and then may be getting that error

@Pramod_Bharat_Mangale When are you adding the data column to the data table? Is it within loop? If it is within loop you remove it and place it before the loop

Okay, and what if we want to add column at the start of the all columns? Is it possible, because as of now it is adding column at the end.

@Pramod_Bharat_Mangale Refer below link