rubyexcel 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80bb23913c3b7ba62ca2aa77d5790e24a8dc610b
4
- data.tar.gz: c1ff697b448df786dfb8f29cf6c3f43f37f8e6ce
3
+ metadata.gz: 646ece59585c7f66430bcf3b9d94d0021112c0ef
4
+ data.tar.gz: 652e6a16f2b6f3e23b105786189bee8e71e97f8a
5
5
  SHA512:
6
- metadata.gz: da3bd961b2bed9df6cc63bbf8604ada00d19dd509c0e1afe9fd0178adfd63fa4ea5a8fe594464b589c5a9e2af60c6209e9f08a38d597a3275d2352c574262b0c
7
- data.tar.gz: f5fbdd7e132b5c2b87f88a3a45904f33346c2f1047a07a6939a292d9b64da31eda73a2bf6d11965b4373e2465a58ce3e667eb377c15266db182dc89252b35d0d
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
@@ -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.8
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-01-03 00:00:00.000000000 Z
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