Re: How to use ADO to read and write data in Excel workbooks using ExcelADO?
If you are using the Visual Basic, then follow the steps mentioned below :
- In Visual Basic, open the file ExcelADO.vbp.
- In the Project menu, select References, and then set references to Microsoft ADO Ext. for DDL and Security and Microsoft ActiveX Data Objects Library.
- Press F5 to run the program. A form appears for the demonstration.
- Click on Example 1. This example creates a copy of the file OrdersTemplate.xls. It then uses ADO to connect to the workbook and open a recordset on a table which is a defined range in the workbook.
- Click on Example 2. This example creates a copy of the file EmpDataTemplate.xls. It uses ADO to connect to the workbook and uses the Execute method of the ADO connection to insert data (INSERT INTO in SQL) in the workbook.
- Click on Example 3. This example creates a copy of the file ProductsTemplate.xls. It uses Object Library Microsoft ADO Extensions for DDL and Security (ADOX) version 2.1 to add a new table (or a new worksheet) to the workbook.
- The last example illustrates how to read data from an Excel workbook. Select a table in the dropdown menu, then click on Example 4.
Dimension 1100 (FMY032J) mini-tower
2.53ghz Intel Pentium 4
80 gig nfts HDD
512 RAM
Main circuit board: Dell 0CF458
BIOS: Dell A00
Display: Intel(R) 82865G Graphics Controller [Display adaptor]
Multimedia: Sound MAX Integrated Digital Audio
Windows XP Home SP2
Bookmarks