Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

File extension and supported formats

Ernesto García edited this page Feb 14, 2014 · 1 revision

This library currently supports reading from most spreadsheet formats, thanks to the wonderful roo gem. Specifically, the following formats are supported:

  • OpenOffice
  • Excel
  • Google spreadsheets
  • Excelx
  • LibreOffice
  • CSV

The filename should contain the extension so the library knows which format to expect. If the filename does not include the extension, or if for some reason you need to force the extension to something else, you can pass it as an option to the import method, like shown below:

EmployeeImporter.import('/path/to/file_without_extension', :extension => :xlsx)

This is useful in cases where you are processing uploaded files, which are commonly stored in temporary files with random names and no extension.