Oleg
The script is excellent no doubt about it.
The problem with it that it is database specific + you have to connect to the database first.
I had several situations when I was in the airport and all I had an excel file from the customer.
Likely there is another solution which can help you in time of need
http://www.dbsoftlab.com/Advanced-ETL-Processor-News/Generate-Insert-Statements.html
Keep coding,
Mike