lib/docparser/output/xlsx_output.rb in docparser-0.0.1 vs lib/docparser/output/xlsx_output.rb in docparser-0.1.0
- old
+ new
@@ -18,11 +18,21 @@
def write_row(row)
@sheet.add_row row
end
- def close
- @sheet.add_table "A1:#{@sheet.cells.last.r}", name: 'Data'
+ def footer
+ unless @header.nil?
+ @sheet.add_table "A1:#{@sheet.cells.last.r}", name: 'Data'
+ end
@package.serialize @filename
+ end
+
+ def rowcount
+ if @header.nil?
+ @sheet.rows.length
+ else
+ @sheet.rows.length - 1
+ end
end
end
end
\ No newline at end of file