Hi, Well, you are writing out a file that needs to be interpreted by Excel, so there are limitations. I don't have time at the moment to really follow up on the question. My suggestion would be to do your formatting in Excel if its really this fixed and non-standard. I.e. have an Emtpy Excel file in which you create a small macro to do the formatting. Then open the two files and run the macro over your output. You can record actions in Excel to get an idea of the needed VBA code. The other option, although I haven't used it so not sure how limited it would be, is to look at the new XLSX libname engine in 9.4. Apparently this can write data out to the XLSX format, so in theory you could create a file with all your formatting etc already present, and then a sheet for raw data, write your raw data out to this sheet, and then have it auto populate in the fomatted tab. If you have 9.4, maybe investigate this first. Here is some help: http://www.lexjansen.com/nesug/nesug13/89_Final_Paper.pdf
... View more