Spreadsheet based tool for building energy codes: analysis, comparison and compliance