Chuck,
It appears bmann knew what you were talking about and offered an applicable reply, but I for one was lost. You see, this doesn't look like Spreadsheet::WriteExcel syntax (the module I use). My point being, if you are going to introduce your code, you might also want to mention what module/library you are using.