updated event handling for spreadsheet data