0
votes

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

1
Very hardly. It would probably be easiest to have a remote PHP script that generates a CSV file, and to download and open thatPekka
You need to set up data connection to the server. I have the same solution for Oracle DB, and it works pretty smoothly.Peter L.
@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..Prem_Kumar_S
@PeterL. can you please explain how ??Prem_Kumar_S
@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.Peter L.

1 Answers

2
votes

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!!