Your script modifies the data array but doesn't write it back to the spreadsheet...that's why you don't see any change in the spreadsheet.
Just add a line after the loop to update the sheet with the appropriate data. I guess it could be something like
ss.getRange(1,1,data.length,data[0].length).setValues(data);