Everytime I opened a file with Spreadsheeet gem, it asked me to repair the file. Replaced the Spreadsheet gem with Axlsx gem.