HI All, I am trying to extract data from a PDF. I use read pdf and write contents to text. When I am trying to read text file and get invoice number and invoice amount, I was failed.
Anyone can help , how to read text file and split text and write to excel?
It look like this:
invoice number: 198530930
total amount: SGD 4879
i want cell A1,write"invoice number", A2 write"198530930"
B1 write"total amount", B2 write" 4879"
And split I use is :
((textData.Split(vbNewLine.ToCharArray)(counter + 2).ToString).Split(" "c)).Last
how to revise this and make it run success?
I was getting error as below.
Main has thrown an exception
Source: Write cell
Message: Index was out of range. Check that the collection has values and the index is less than the size of the collection.
Exception Type: IndexOutOfRangeException