I am working on a data collection project where it would be advantageous to offer users a spreadsheet with Macros in it as a download. We would need to pre-populate this spreadsheet with data from a database depending on user-specific information as well as a query string of some kind. I've looked around a bit and have found [PHPExcel but from what I've seen so far, it does not support macros. Does anyone know if there's a way with PHP to either construct a spreadsheet from scratch and add macros to it OR take some existing spreadsheet with macros and add data to it (e.g., add a sheet with some data) ?