rubyexcel 0.2.9 → 0.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56cbaf87bad39d48f875f9312e994296ecfcd6dc
4
- data.tar.gz: 2c46e48065fd28719dd96baaba87e0215b5b7e60
3
+ metadata.gz: e33af53bc3f51434f755feea7e7e4ed88a546835
4
+ data.tar.gz: afc4d1c1c5e5dd8c69d87305a041708f27d46071
5
5
  SHA512:
6
- metadata.gz: d095e09ff7d71921de4341f4ed7fbb738630f475f21355be75ef79bc57fa0aeaa409f7ff7d563aa088d3010e20bc1ea57c58796b77d58f40cf96222c246d1bc9
7
- data.tar.gz: 2cb18345c9990dc8288caaa8820231851431cdb942cd32e44fdb41e8fee095f83dd96b8b92a13294cc0c33f9edb9171434f29f4c40d99564f7b865f4630d8a8e
6
+ metadata.gz: 81eaa6abc692eb99c86f1fb2a35554b361dc1f2d2dff487c20bcf7f67878ecbc5044a82edb41251d46967551c42c71e4a4e2ac54c6b0505efe9475521a80cf5f
7
+ data.tar.gz: e565b35e6946964f1414e76cc2e08c3f83d719349184bf268ac69392e68d71c14695f1890dd060988601e185e91a9515ab889d4e215d66104edb9ea3293cfa0d
@@ -174,6 +174,14 @@ require_relative 'address.rb'
174
174
  calc_dimensions
175
175
  end
176
176
 
177
+ #
178
+ # Wipe all data
179
+ #
180
+
181
+ def delete_all
182
+ @data = [[]]
183
+ end
184
+
177
185
  #
178
186
  # Deletes the data referenced by a column id
179
187
  #
@@ -174,7 +174,7 @@ module RubyExcel
174
174
  #
175
175
 
176
176
  def clear_all
177
- @data = Data.new( self, [[]] )
177
+ data.delete_all
178
178
  self
179
179
  end
180
180
  alias delete_all clear_all
@@ -487,6 +487,7 @@ module RubyExcel
487
487
  def reverse_rows!
488
488
  data.reverse_rows!; self
489
489
  end
490
+ alias reverse! reverse_rows!
490
491
 
491
492
  #
492
493
  # Create a Row from an index
@@ -513,6 +514,18 @@ module RubyExcel
513
514
  end
514
515
  alias each rows
515
516
 
517
+ #
518
+ # Save the RubyExcel::Sheet as an Excel Workbook
519
+ #
520
+ # @param [String] filename the filename to save as
521
+ # @param [Boolean] invisible leave Excel invisible if creating a new instance
522
+ # @return [WIN32OLE::Workbook] the Workbook, saved as filename.
523
+ #
524
+
525
+ def save_excel( filename = nil, invisible = false )
526
+ workbook.dup.clear_all.add( self.dup ).workbook.save_excel( filename, invisible )
527
+ end
528
+
516
529
  #
517
530
  # Sort the data by a column, selected by header(s)
518
531
  #
@@ -629,7 +642,7 @@ module RubyExcel
629
642
  alias unique! uniq!
630
643
 
631
644
  #
632
- # Remove any Rows with duplicate values within a Column
645
+ # Select the used Range in the Sheet
633
646
  #
634
647
  # @return [Range] the Sheet's contents in Range
635
648
  #
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.2.9
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Pearson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-04 00:00:00.000000000 Z
11
+ date: 2013-09-10 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,