mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-11 09:26:37 +08:00
Merge pull request #1233 from ZmagoD/zd_SCI_2589
fixes bug with xslx files with numeric values [fixes SCI-2589]
This commit is contained in:
commit
00ed339520
1 changed files with 2 additions and 2 deletions
|
@ -42,9 +42,9 @@ class SpreadsheetParser
|
|||
header = []
|
||||
columns = []
|
||||
i = 1
|
||||
rows.each do |row|
|
||||
rows.each do |row_values|
|
||||
# Creek XLSX parser returns Hash of the row, Roo - Array
|
||||
row = row.is_a?(Hash) ? row.values.map(&:to_s) : row.map(&:to_s)
|
||||
row = parse_row(row_values, sheet)
|
||||
header = row if i == 1 && row
|
||||
columns = row if i == 2 && row
|
||||
i += 1
|
||||
|
|
Loading…
Reference in a new issue