Added syntax error checking for spreadsheet