rubyexcel 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rubyexcel/excel_tools.rb +2 -1
- data/lib/rubyexcel/sheet.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 646ece59585c7f66430bcf3b9d94d0021112c0ef
|
4
|
+
data.tar.gz: 652e6a16f2b6f3e23b105786189bee8e71e97f8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3afbc8d785d392b6307e2a8b545ea85dc1dbbf2973c4ef3f6e796cf3ddcacc3fa9feea36e21745650f6a0f879bea348d3e71fe383371fc866d8c7318d6ba952
|
7
|
+
data.tar.gz: ea43b28ca7f3498a31d318e12e906af3315789f4089692b8b425f264aad0ca2679fe50c595615cb812a2adf35e0a6b425604a03c6eb5b018329b9958276a7bb0
|
@@ -74,6 +74,7 @@ module RubyExcel
|
|
74
74
|
def dump_to_sheet( data, sheet=nil )
|
75
75
|
data.is_a?( Array ) or fail ArgumentError, "Invalid data type: #{ data.class }"
|
76
76
|
sheet ||= get_workbook.sheets(1)
|
77
|
+
sheet.cells.clear
|
77
78
|
sheet.range( sheet.cells( 1, 1 ), sheet.cells( data.length, data.max_by(&:length).length ) ).value = data
|
78
79
|
sheet
|
79
80
|
end
|
@@ -129,7 +130,7 @@ module RubyExcel
|
|
129
130
|
|
130
131
|
# Open the file
|
131
132
|
begin
|
132
|
-
wb = excel.workbooks.open({'filename'=> other, 'readOnly' => true})
|
133
|
+
wb = excel.workbooks.open({'filename'=> other, 'readOnly' => true, 'UpdateLinks' => false})
|
133
134
|
rescue WIN32OLERuntimeError
|
134
135
|
excel.quit
|
135
136
|
raise
|
data/lib/rubyexcel/sheet.rb
CHANGED
@@ -280,6 +280,17 @@ module RubyExcel
|
|
280
280
|
data.empty?
|
281
281
|
end
|
282
282
|
|
283
|
+
#
|
284
|
+
# Export data to a specific WIN32OLE Excel Sheet
|
285
|
+
#
|
286
|
+
# @param win32ole_sheet the Sheet to export to
|
287
|
+
# @return WIN32OLE Sheet
|
288
|
+
#
|
289
|
+
|
290
|
+
def export( win32ole_sheet )
|
291
|
+
parent.dump_to_sheet( to_a, win32ole_sheet )
|
292
|
+
end
|
293
|
+
|
283
294
|
#
|
284
295
|
# Removes all Rows (omitting headers) where the block is falsey
|
285
296
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyexcel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Pearson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A tabular data structure in Ruby, with header-based helper methods for
|
14
14
|
analysis and editing, and some of Excel's API style. Can output as 2D Array, HTML
|