roo-rb / roo-xls

Roo::Xls add support for legacy Excel file standards to Roo.
MIT License
82 stars 82 forks source link

File remains opened after reading #40

Open aminzer opened 6 years ago

aminzer commented 6 years ago

Following code raises Permission denied @ unlink_internal - resources/tmp.xls (Errno::EACCES):

require 'roo-xls'

file_path = 'resources/tmp.xls'
Roo::Excel.new(file_path)

File.delete(file_path)

Can you please describe a correct way to close file after reading in case my code isn't correct?

roo-xls v1.1.0

hugebag commented 6 years ago

Have the same issue with roo-xls v1.2.0. I believe this is an issue specific to the roo-xls gem because I don't have an issue deleting a .xlsx file opened with the roo gem