An interesting question and one with more than one possible answer.
It could be that all you need to do is import those batch numbers into a table where a unique values/validate always validation rule prevents importing duplicates.
Then you just import from the same "details" table or file a second time, but into this table.
Calculation fields could then be crafted to use aggregate functions to compute summary totals of the related details table.
Sum ( detailstable::Amount ) would total up the amount table for a given batch # if you have a relationship defined as:
SummaryTable::Batch# = DetailsTable::Batch#