GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - openminds/railsxls: A copy of the original railsxls plugin, but suited for Rails Edge

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
lib
lib
 
 
test
test
 
 
README
README
 
 
Rakefile
Rakefile
 
 
init.rb
init.rb
 
 

Repository files navigation

Rails Worksheet Pluglin
=======================

A Rails plugin that allows xls format worksheet documents.

Dependencies

JDK 1.4 or greater
YAJB 0.8.1 or greater
Jakarta POI (No need for install. Supplied as part of this package)

Install Instructions for YAJB

You can download YAJB from 
http://www.cmt.phys.kyushu-u.ac.jp/~M.Sakurai/java/ruby/yajb-0.8.1.tar.gz
Extract the tar to a temp directory and run setup.rb to install YAJB.

USAGE
=====

Exposes Jakarta POI library for XLS manipulation through a built-in object 
called workbook in the view template. View names should use a .rxls as the extension

# Simple Example

# views/controller_name/report.rxls

sheet = workbook.createSheet("new sheet")
row = sheet.createRow(0)
row.createCell(0).setCellValue(1)
row.createCell(1).setCellValue(1.2)
row.createCell(2).setCellValue("This is a Testing Row")
row.createCell(3).setCellValue("Guru Krupa")


# controller returns '110.xls'
def report
	@client = Client.find(params[:id]) # Which is 110
	render :action => 'report', :layout => false
end

# controller returns 'report.xls'
def report
   render :action => "report", :layout => false
end

# controller returns 'my-report.xls'
def report
   @worksheet_name = 'my-report.xls'
   render :action => "report", :layout => false
end

# For large Worksheet documents 

# Use CellBatch to batch the cell inserts/updates
# Use RowGroupBatch to batch the row grouping calls
# When only single sheet is present, the cell as well as row group
# changes are applied at once aumatically as a single Batch call using
# a custom java Helper function
# When multiple sheets are present, after doing the sheet specific
# cell as well as group operations call CellBatch.write_to(sheet_object)
# for cell updates.
# Call RowGroupBatch.group_rows to apply rowGroupings.

CellBatch.add(5,1,"Row 6 col 1")
CellBatch.add(5,2,"Row 6 col 2")
 
CellBatch.add(7,1,"Row 8 col 1")
CellBatch.add(8,2,"Row 9 col 2")

RowGroupBatch.add(7,8)

CellBatch.add(9,1,"Two rows above is grouped")

ADDITIONAL POI USAGE INFORMATION
================================

See Jakarta POI Project Home Page below for a quick guide on POI Usage

http://jakarta.apache.org/poi/hssf/index.html

Jakarta POI API Doc link is given below:

http://jakarta.apache.org/poi/apidocs/index.html?org/apache/poi/hssf/usermodel/package-summary.html

BUG REPORTS
===========

http://github.com/DefV/railsxls/tree/master

CHANGE LOG
==========

2006-08-18 - Initial Release of version 0.1
2008-10-01 - Changed the plugin so it works with Rails Edge

About

A copy of the original railsxls plugin, but suited for Rails Edge

Resources

Readme
Activity
Custom properties

Stars

25 stars

Watchers

3 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.