Excel uses VB macros to generate SQL statements.

by bossma on 2007-11-22 13:57:51

Sometimes, it is necessary to import data from an Excel file into a database. A common approach is to use a program to read the Excel file and then store the data in the database. Here, we'll try a different method: generating SQL statements using Excel, and then using these SQL statements to update the database.

This article mainly explains how to use VB macros in Excel to construct the required SQL statements and generate a file.