The following code is based on assumptions:
- The text files are all formatted exactly alike, and only the data values vary between them.
- The text files have the extension .txt.
- I do not have MS Excel to test with, so I am generating a CSV based on rows of data from each text file.
- Your text files are not in multiple levels of sub-directories. I am asking for a parent folder and the text files are all in it.
- I make no effort to sort the CSV. You can do this after you open it in Excel.
The following Ruby code receives a quoted POSIX path of the starting folder location, and a pre-determined CSV filename, which it will create on the Desktop. The application gets every text file in a list, and from that list, it parses the text file for the predesignated data. It then appends that data to the CSV file, then processes the next text file, etc.
First, here is the Ruby code as it would run from the Terminal:

And the AppleScript that you copy/paste into the Script Editor (Dock : Launchpad : Other : Script Editor), click compile, and then run.
set OUTCSV to POSIX path of ((path to desktop as text) & "ntext.csv") as text
set start_folder to (POSIX path of (choose folder))
set args to (text 1 thru -2 of start_folder)'s quoted form & space & OUTCSV's quoted form
log args
my build_csv_from_files(args)
return
on build_csv_from_files(nargs)
return do shell script "ruby <<'EOF' - " & nargs & "
#!/usr/bin/ruby
require 'csv'
header = ['Invoice Number', 'Date', 'Grams', 'TotalAmt', 'Tax', 'Tax2',
'Invoice Amount']
# regular expressions to isolate required column data
inv_and_date = /[A-Z]{2}[0-9]+|\\d+-\\d+-\\d+/
grams = /(?<=Grams)\\s*(\\d+\\.\\d+)$/
amounts = /Rs\\.\\d+\\.\\d+/
start_folder, outcsv = ARGV unless ARGV.length < 2
# heads only once
unless File.exist?(outcsv)
# write unquoted headers. Switch comments if quoted headers needed.
# CSV.open(outcsv, 'a+', headers: true,
# :quote_char => '\"',
# :force_quotes => true) do |csv|
CSV.open(outcsv, 'a+', headers: true) do |csv|
csv << header
end
end
# get each text file, then extract/append data to CSV file
Dir.glob(\"#{start_folder}/*.txt\").each do |f|
txt = File.read(f).split('\\n').sample
csv_row = txt.scan(/#{inv_and_date}/)
csv_row += txt.scan(/#{grams}/).flatten
csv_row += txt.scan(/#{amounts}/)[1..-1]
CSV.open(outcsv, 'a+', headers: true) do |csv|
csv << csv_row
end
end
EOF"
end build_csv_from_files