Permalink
Browse files

Added an example of search for row using text then adding a row after…

… the result.
  • Loading branch information...
1 parent 4d5fc9d commit ceb7ef790dede5cc3e27dbacc1f31552ad7a9044 @map7 map7 committed with Odaeus Apr 28, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 examples/add_row_table.rb
View
7 examples/add_row_table.rb
@@ -37,5 +37,10 @@
puts data
-puts data.row_search("Cur", :column => 0)
+puts 'Add Row after Sew Curtains'
+pos = data.row_search("Sew", :column => 0) # Search for Sew in column 0 and get position.
+pos += 1
+data.add_row(["Wash Car", "8"], :position => pos)
+puts data
+

0 comments on commit ceb7ef7

Please sign in to comment.