If there is an error don't write the XLS(X) file.