diff --git a/lib/roo/excelx/shared.rb b/lib/roo/excelx/shared.rb index bcd2c08b..f29ad070 100755 --- a/lib/roo/excelx/shared.rb +++ b/lib/roo/excelx/shared.rb @@ -16,7 +16,9 @@ def initialize(dir, options = {}) end def styles - @styles ||= Styles.new(File.join(@dir, 'roo_styles.xml')) + file_path = File.join(@dir, 'roo_styles.xml') + File.new(file_path, "a+") {} unless File.exists?(file_path) + @styles ||= Styles.new(file_path) end def shared_strings