Recently i have used phpExcel library to generate reports in excel format in cakephp. Every thing is working fine except pivot Tables.
I am using a master excel she
Albeit this is an old issue, I'd like to give an answer: I had the same issue some months ago and finally decided that I need to do my own implementation (so this is self-advertisement..)
This solution is far from perfect - since I'm maybe the only person using it - but it is doing exactly what you describe: Writing raw data into one sheet of a "master file" allowing you to create reports:
https://github.com/svrnm/exceldatatables
If you use Go, you can use excelize to create a pivot table in the spreadsheet.