0

Is it possible to have an excel sheet that gets updated from a mysql server using a specific query when ever it gets opened using VBA?

I am new to VBA and is it possible to monitor the data changes on the excel sheet while updating the sheet??

Thanks

9
  • Very hardly. It would probably be easiest to have a remote PHP script that generates a CSV file, and to download and open that Commented Feb 1, 2013 at 16:41
  • You need to set up data connection to the server. I have the same solution for Oracle DB, and it works pretty smoothly. Commented Feb 1, 2013 at 16:45
  • @Pekka웃 thanks for the answer..but i want it to be from the excel file itself as will be easy for me to work easily by not opening nay other applications like browser.. Commented Feb 1, 2013 at 16:45
  • @PeterL. can you please explain how ?? Commented Feb 1, 2013 at 16:46
  • @Prem_Kumar_S no any other applications needed: as soon as query is set up, you just need to refresh it. That's it. Fro my case DB select is linked as source data for pivot table. Commented Feb 1, 2013 at 16:47

1 Answer 1

2

If you use the Data > Get External Data toolbar to set up the MySQL data pull, you can then set the workbook to refresh upon opening - Here's a link that shows the very basics.

As for tracking / moitoring changes, you'd have to be more detailed about how you'd like that to happen... As a general rule, it's not very easy to do.

Hope this helps!!

Sign up to request clarification or add additional context in comments.

2 Comments

get external data works based on DSN connection... I want this to be done with a connection string as it will be easy to access any where in my network...
What about Data > From Other Sources > Other\Advanced > in connection tab Use Connection String

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.