Closed jasonperrone closed 6 years ago
Hello, are you done with that :) I suggest using this method :
book = SimpleSpreadsheet::Workbook.read params[:file].tempfile.path
I could swear I tried that. lol. What I ended up doing was simply staged the file on the local server to be processed by SimpleSpreadsheet.
it is any possibilities to check whether the imported data is bold or italic and so on ??
I hav a data which is 22.9% but it is getting uploaded as 0.029... how to get out of tis issue ??
This lib doesn't work with files without extensions. Change the extension of the file beforehand.
Any chance of fixing this behaviour?
both the file extensions XLS and XLSX provides the same outcomes for tis....till i cant fix tis bug...
HI, How can we iterate througn multiple sheet present in Excel.
Eg:
s = SimpleSpreadsheet::Workbook.read("abc.xlsx") s.selected_sheet = s.sheets.first
I can access sheets by
s.sheets.first, s.sheets.second, s.sheets.third....
But i am not getting option for iterating over all sheets present.
I need somethig like this.
s.sheets.each do |sheet| s.selected_sheet = sheet end
Thanks
Got the solution...
BTW, the answer above from thanhquang1988 was correct.
Hi, could you tell me what would be the preferred method for reading an already uploaded file (such as through a file_field_tag in a multipart form)? It wants a file path and name, but what if you already have the file? For example, Ruby CSV would just do CSV.new(file.read).
Sorry for the n00b question.