How to display data in Excel spreadsheet from MySQL. Part 2
By Sergey Skudaev
![]()
![]()
![]()
![]()
![]()
This page continues tutorial about displaying data from MySQL database in MicroSoft Excel spreadsheet using ADODB. Read a Part 1 if you missed it.
Records are inserted in the credit_card table. Note, that in Windows database, table, and field names are not case sensitive. In Unix or Linux they are case sensitive.
Open MS Excel spread sheet. Click Tools, macros, VB editor. VB editor opens.
Click Tools, references and select "Microsoft ActiveX Data Objects 2.8 Library"
Click OK
Open code window and type VB code in General declarations:Public conn As ADODB.Connection
Public rsCard As ADODB.Recordset
Select General drop down list and select Worksheet object. Select Sheet1 in VBA project.
Select Activate event from the right drop down list. Private Sub Worksheet_Activate () subroutine displays.Type VB code that will be executed on Worksheet Activate event. Worksheet activate event occurs when you select a worksheet and it displays on the screen.
Save changes. Open spreadsheet and you will see a table with data from MySQL. We are done!
Did you find information useful?
Send to your friend a link to this page
If you like this page click +1 button.
Please rate the tutorial
How to Build Your Own Web Site from Scratch [Kindle Edition] $2.99
Earn Money on Internet as an Affiliate [Kindle Edition] $0.99
| Comments | |
|---|---|
- Home
- excel_mysql
- Batch Files
- Java Properties
- Form Validation
- Display Image PHP
- Upload File PHP
- phpMyAdmin
- Environment Variables
- Delete Trojan horse
- Database Design
- Password Keeper
- MySQL and Excel
- Learn MySQL
- Learn SQL
- Learn PHP
- Learn C++
- Learn Java
- Learn Visual Basic
- Web Site Tips
- User_Auth. Demo
- My Best CSS Layout
- CSS Tables
- PHP + Oracle
- Using Twitter
- Loading Speed
- Set Shopping Cart
- Advertise here
- Site map
- Registration
Web programming Tips