molten-trunk/molten5_withgrid/vendor/plugins/excel/lib/excel.rb
def addWorksheetFromActiveRecord(sheetname, objectType, objects)
	      
	      objects = [objects] unless objects.class == Array
	    
	      item = [sheetname.to_s, objectType.to_s, objects]
	      @worksheets += [item]
	    end
# Add a sheet to the colleection of worksheets.
# * sheetname (string) is the name of the worksheet tab
# * objectType (string) is the type of object you're sending in.
#
# * objects is your collection of ActiveRecord objects.
#
# Here's an example
#    
#     @book = Book.find(:all)
#     @authors = Authors.find(:all)
#     addWorksheetFromActiveRecord "Books", "book", @book
#     addWorksheetFromActiveRecord "Authors", "author", @authors

Add a sheet to the colleection of worksheets.
sheetname (string) is the name of the worksheet tab
objectType (string) is the type of object you're sending in.

objects is your collection of ActiveRecord objects.

Here's an example


Add a sheet to the colleection of worksheets . sheetname ( string ) is the name of the worksheet tab objectType ( string ) is the type of object you ' re sending in . objects is your collection of ActiveRecord objects . Here ' s an example
def addWorksheetFromActiveRecord(sheetname, objectType, objects)
	      objects = [objects] unless objects.class == Array
	      item = [sheetname.to_s, objectType.to_s, objects]
	      @worksheets += [item]
	    end
def addWorksheetFromActiveRecord ( sheetname , objectType , objects ) objects = [ objects ] unless objects . class == Array item = [ sheetname . to_s , objectType . to_s , objects ] @worksheets += [ item ] end
Add a sheet to the colleection of worksheets.
Add a sheet to the colleection of worksheets .
sheetname
objectType
objects