File .txt and excel invoice

Hello I have a problem,

I have the ticket in .txt is the next :slight_smile:


SALE

TERM DOCTO TDA SALE
2 7162 0002 13453297

  NAME: FABIOLA FISHER

COL IND BROADWAY SECC 111 N
1018866800 7,999.00
DESC X PROM % 25.00 1,999.75-
COJIN SUEDE DESIG SECC 108 N
0049078757 359.00
DESC X PROM % 25.00 89.75-
COLUMPIO BARRO 90 SECC 116 N
0050662314 215.00
DESC X PROM % 25.00 53.75-

***** TOTAL $ 6,429.75

SIX THOUSAND PESOS
TWENTY PESOS 75/100 M.N.*

       TOTAL$         6,429.75

642975000000000000-6429750000000000000
00000000000000000000000000000000000000
CUSTOMER LUN 6/AGO/2018 09:10

lsoni.com.mx

INVOICE

Stores| Kioscos
BRSUNHQQBDRLTJGYQJBX


I have the code BRSUNHQQBDRLTJGYQJBX in the string and I need to get the quantity of this line
1018866800 7,999.00, I need the quantity and compare in the excel with the cell B1 with maybe the same quantity, and so with the nest quantity 0049078757 359.00,

What I can do with the .txt and the excel???
at the end I need to write the amounts in another excel
:frowning:

  • Save “1018866800 7,999.00” in String variable called: code
  • Save the quantity in Int variable called: quantity1
    { quantity1 = code.ToString.Length }
  • Save the quantity of the excel cell: quantity2
  • Compare the values:
    { if(quantity1 = convert.toInt32(quantity2)) … }

Hope it can help you. Make a counter to move between Excel cells, in way to check all the values of the Excel. Or better, use datatables.

Bests,
Pablo