No need for a spreadsheet, BBEdit has a line numbering command :]
1. create document with 250 blank lines
2. Text > Add/Remove Line Numbers. Don’t add spaces or justify — we just want a plain number
3. Do a Grep search for an entire line:
Replace with the example HTML below verbatim, except substitute & for the 3 digits:
<figure>\n<img src="images/eq/&.jpeg" width="100%" />\n</figure>\n
4. profit