No spreadsheet cleanup between the PDF and Tally
The manual way is PDF to spreadsheet, then an evening of deleting blank lines, splitting merged cells and retyping into the template, after which Tally may still refuse the result. With the XML written directly, that middle step is gone. Moving each entry to its real account is still on you.