This might be a fairly unusual question, but I'm truly stuck here. I'm reading data from a MYSQL database, and creating a table out of this data through PHP using Echo. Now, I'd like to move onto the next step and export this data (the data in the table) to an Excel document. I really like the way PHPExcel works, and how simple it is but I'm having a hard time figuring out the most efficient way of obtaining the data, and putting it in an excel document. Surely, I do not want to manually write out "A1", "A1 data" all the way down to Z1000 - catch my point? I believe that I should loop through everything. Now, here is where the question becomes tricky; is there some way (keep in mind this needs to be done through PHP) to read through the table cell by cell (loop) and assign the values to an array, then just loop through the array like A1, arr[0] etc?
I figured I'd have to use JavaScript to read through the table cell by cell, but then how could I assign the data to an array so that I could then use it as part of a PHP script - since PHPExcel is written in PHP.
Is this question making sense to any of you or am I missing a lot of information here? Let me know and I can edit this question so that it makes some more sense to you all.
fputcsv... Excel will open it right up