Extract values using Substring

Hi @lakshman

Try this sample:

  • Read PDF text -->output: pdf_txt

  • Write text file -->input: pdf_txt

  • Read text file --> output: txt_str

  • For each item in txt_str.Split(vbNewLine.ToCharArray)
    here item will iterate over rows in txt_str
    [Note : item can be filter using keyword(or regex)]

4 Likes

Hi All,

Charge and Tax details :
Description Charge Amount IGST SGST CGST
FCY Conversion(Only GST amount being
charged)
INR 4,849.83 INR 872.97 INR 0.00 INR 0.00
TOTAL INR 0.00 INR 872.97 INR 0.00 INR 0.00
GRAND TOTAL of Charges & Taxes : INR 872.97 GSTIN :
34AADCS810
4P2Z1

I want to extract highlighted text from above text and also want to use delimiter as space. Can anyone help me in this ?

Thanks & Regards,
Lakshman Ganta.

Hi @lakshman,
if its a single string then split it with NewLine character, then you will get a string array. Then use index to select the required line.

and if its a text file, use ReadAllLines() method, it’s return type is a string array, then do the same thing what i said above

2 Likes

I converted the pdf to word and read the tabular data. Paste it to an excel using a VBA Macro and then you can either created a data table or read cell by cell from the Excel. I was able to achieve what I wanted. I even got a logic to read multiple cells from the excel originating from a specific cell.

I can share the screenshots of the logic however cant share the code.

Regards,
Santosh Sundar

Can you please share your logic @SantoshDS

Hey Kanthesh,

Sure. How urgent is it? I am travelling to Ireland tomorrow. Will do my best to share by tomorrow.

Regards,

Santosh Sundar

Hey @SantoshDS,

It’s Okay
When you find some time please share your logic.