CHG: changed the spreadsheet writer to allow more options
CHG: working on spreadsheet IO