Excel solved

So, after yesterday’s issue with Excel 2007 rejecting my perfectly formulated html and xml, I gave up on ever getting it to work.  This morning I went back to a thought about the Apache POI utility that’s been out and about for several years now.  It just so happens that it is already installed natively on the CF server, so I was able to utilize it right away.  Of course my ‘bff” google has produced many many lines of code for me to borrow and in this case there was no exception.  Within a few minutes I was able to get up and running a query output page that actually made me cringe at how hard I was working at it yesterday.  Basically what I did was lift most of the code from here, swap out the file output code with byteStream code, and then making a few changes to cell types based on the query metadata that I had done in the previous incarnation, I was able to successfully create an Excel document that did not throw the warning box up.