Let us consider that the spreadsheet has a column that has the following entries:
Now, lets consider that I have to strip the first suffix, enclose the values in quotes and pass them in the IN query. So, I copy the column and paste in a text file and run the following commands on the file.
sed -i 's/-1//' ./myfile.txt
sed -i 's/-2//' ./myfile.txt
'12345', '23456', '34567', '45678', '56789',
`C-x ('. The macro consisted of the following keys in sequence [try it yourself to be clear]:
`C-x )'. Now, I had one line edited so I let emacs run the macro 4 times using the following command:
C-u 4 C-x e
I got the inspiration for using macros in the following video.