i need to copy a few specific text from a downloaded pdf file and paste in their respective cell in excel
how can i do this ?
Hie @mdaffakhairy for this use read pdf/read Ocr activity and save their data in variable…
after this use string manipulation or regex to extract the specific field you want to extract and save them in a variable use build data table and create column for them and use add data row activity and pass those variable in add data row and pass the build data table variable in add data row and finally use write range activity …
Note: use for each if you are working with multiple pdfs
cheers Happy Automation
hey i have some trouble in the assign activity how can i input the specific text from pdf in the “value to save” ? should i just input it normally for example : “example”
Use Write cell workbook activity to write the specific text into a cell.If you want to write data in multiple cells then use for loop inside use write cell workbook increment the cell by 1 dynamically like A+(Counter+1).ToString
Hope this will help you
that is not what i meant how i can i choose the specific text from pdf that i want to copy and paste using the assign activity
You want to extract the specific text from pdf to excel then read the pdf using Read Pdf Text activity and then use String Manipulations or Regular Expressions to extract the text,if you require any help related to manipulations and Regex,Then write the Output of Read pdf text to Text file Put here so that we will help you to extract specific text
here is the screenshot of one of a few text that i need to extract from the pdf
please help me with the manipulation and regex
Output=System.Text.RegularExpressions.Regex.Match(Str_InputText,"\d{2}\s([A-Z])\w+\s+\d{4}").Value
Pass your read pdf text output string in the place of Str_InputText
Hie @mdaffakhairy using assign activity of string variable and pass this syntax
System.Text.RegularExpressions.Regex.Match( newName,“(\d{1,2} \w+ \d{4})”).Value
this will extract the date from the pdf result value…
cheers Happy Automation