- Retrieve the data from pdf file. This will be assigned to a string variable strContent
- Find index of the text from where the data need to be copied. Consider your search text is saved in a string variable strStartSearchText and index is stored in an integer variable intStartIndex
intStartIndex = strContent.IndexOf(strStartSearchText) - Find index of the text where the data copying should be stopped. Consider your search text is saved in a string variable strEndSearchText and index is stored in an integer variable intEndIndex
intEndIndex = strContent.IndexOf(strEndSearchText) - Find length of startindex to endindex and assign it to an int variable, intLength
intLength = intEndIndex - intStartIndex + 1 - Find substring of the text. Consider your resultant data will be assigned to a string variable strResult and it contains the entire table data
strResult = strContent.Substring(intStartIndex, intLength) - Now generate a regex template to match every line items.
- Use “Matches” activity to retrieve all the line items.
- Loop through the result, use string manipulation methods to retrieve column data.
3 Likes