Pull data to excel

Avatar
  • updated
  • Answered

How can I pull data from my database on a flat file to upload to excel? I specfically want name address phone number and emial address of all my customers and date created.

Pinned replies
Avatar
anonymous
  • Answer
  • Answered

Thanks for getting in touch with us! Unfortunately, there is no 'one size fits all' answer for this. Exactly how to pull data from a database and into an Excel file is going to involve custom coding. It's the sort of problem that is beyond the scope of our support and will either require you to hire a developer or learn the appropriate coding and development skills. 

If you wanted us to set something up for you, I would check with our Managed Hosting team. You can describe what you want to do to them and they will provide you with a quote on the cost to set it up.

If you're interested in setting this up yourself, though, I would highly recommend the book Automate the Boring Stuff with Python, which is freely available online. The book teaches basic scripting using the python programming language. Chapter Twelve specifically covers taking data out of and putting data into Excel spreadsheets. Working through the book, you should be able to extract the needed information from a downloaded, offline copy of the database into an Excel spreadsheet.


If you wanted to continuously pipe the data from the live database into a spreadsheet, you're also going to need a basic understanding of BASH scripting (to run the operations on the server) and SQL and to properly query the database. Plus, you will likely require at least a VPS plan to install and customize everything you needed to do so. 

As always, please make backups before running any code on the server. In your case it's probably a good idea to frequently download database backups, too! 

Avatar
anonymous
  • Answer
  • Answered

Thanks for getting in touch with us! Unfortunately, there is no 'one size fits all' answer for this. Exactly how to pull data from a database and into an Excel file is going to involve custom coding. It's the sort of problem that is beyond the scope of our support and will either require you to hire a developer or learn the appropriate coding and development skills. 

If you wanted us to set something up for you, I would check with our Managed Hosting team. You can describe what you want to do to them and they will provide you with a quote on the cost to set it up.

If you're interested in setting this up yourself, though, I would highly recommend the book Automate the Boring Stuff with Python, which is freely available online. The book teaches basic scripting using the python programming language. Chapter Twelve specifically covers taking data out of and putting data into Excel spreadsheets. Working through the book, you should be able to extract the needed information from a downloaded, offline copy of the database into an Excel spreadsheet.


If you wanted to continuously pipe the data from the live database into a spreadsheet, you're also going to need a basic understanding of BASH scripting (to run the operations on the server) and SQL and to properly query the database. Plus, you will likely require at least a VPS plan to install and customize everything you needed to do so. 

As always, please make backups before running any code on the server. In your case it's probably a good idea to frequently download database backups, too!