mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-10 23:25:31 +08:00
Fix issue with empty cells for xlsx inventory imports [SCI-4003]
This commit is contained in:
parent
61805cb837
commit
6c57f56bf4
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ class SpreadsheetParser
|
|||
if sheet.is_a?(Roo::CSV)
|
||||
sheet
|
||||
elsif sheet.is_a?(Roo::Excelx)
|
||||
sheet.each_row_streaming
|
||||
sheet.each_row_streaming(pad_cells: true)
|
||||
else
|
||||
sheet.rows
|
||||
end
|
||||
|
@ -60,7 +60,7 @@ class SpreadsheetParser
|
|||
if row.is_a?(Hash)
|
||||
row.values.map(&:to_s)
|
||||
elsif sheet.is_a?(Roo::Excelx)
|
||||
row.map { |cell| cell.value.to_s }
|
||||
row.map { |cell| cell&.value&.to_s }
|
||||
else
|
||||
row.map(&:to_s)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue