website/index.html in roo-0.2.3 vs website/index.html in roo-0.2.4

- old
+ new

@@ -31,11 +31,11 @@ <div id="main"> <h1>roo</h1> <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/roo"; return false'> Get Version - <a href="http://rubyforge.org/projects/roo" class="numbers">0.2.3</a> + <a href="http://rubyforge.org/projects/roo" class="numbers">0.2.4</a> </div> <h2>What</h2> <p>This gem allows you to access the content of open-office and Excel spreadsheets (.ods/.xls).</p> @@ -59,11 +59,11 @@ <p>Supposed you have created this spreadsheet:</p> - <p><img src="Screenshot-spreadsheet.png"></p> + <p><img src="Screenshot-spreadsheet3.png"></p> <p>which includes the amount of work you have done for a customer.</p> @@ -75,52 +75,41 @@ 1 require 'rubygems' 2 require 'roo' 3 4 HOURLY_RATE = 123.45 5 - 6 oo = Openoffice.new("/home/tp/Desktop/simple_spreadsheet.ods") + 6 oo = Openoffice.new("simple_spreadsheet.ods") 7 oo.default_sheet = oo.sheets.first - 8 4.upto(1000) do |line| - 9 # puts "line: "+line.to_s - 10 date = oo.cell(line,'A') - 11 start_time = oo.cell(line,'B') - 12 start_time = 0.0 unless start_time - 13 end_time = oo.cell(line,'C') - 14 end_time = 0.0 unless end_time - 15 pause = oo.cell(line,'D') - 16 pause = 0.0 unless pause - 17 sum = (end_time-start_time)-pause - 18 comment = oo.cell(line,'F') - 19 amount = sum * HOURLY_RATE - 20 if date - 21 puts "#{date}\t#{sum}\t#{amount}\t#{comment}" - 22 end - 23 end + 8 4.upto(12) do |line| + 9 date = oo.cell(line,'A') + 10 start_time = oo.cell(line,'B') + 11 end_time = oo.cell(line,'C') + 12 pause = oo.cell(line,'D') + 13 sum = (end_time - start_time) - pause + 14 comment = oo.cell(line,'F') + 15 amount = sum * HOURLY_RATE + 16 if date + 17 puts "#{date}\t#{sum}\t#{amount}\t#{comment}" + 18 end + 19 end </code> </pre> <p>which produces this output</p> <pre> <code> -2007-05-07 1.75 216.0375 lokale lauff��hige Umgebung aufgesetzt, Datenbank eingerichtet, Repository erstellt und anf��nglichen Sourcecode eingestellt -2007-05-07 1.0 123.45 Userstories erfasst -2007-05-08 1.0 123.45 Test neuen User anlegen, Perioden (��berschneidend) anzulegen -2007-05-08 1.0 123.45 Bestandsaufnahme/Aufwandssch��tzung/Korrespondenz -2007-05-08 0.5 61.725 Functional Test Ueberschneidung -2007-05-14 0.5 61.725 -2007-05-14 0.5 61.725 -2007-05-15 1.0 123.45 -2007-05-15 0.75 92.5875 G��stebuch -2007-05-15 0.5 61.725 G��stebuch -2007-05-15 0.5 61.725 G��stebuch -2007-05-16 1.0 123.45 G��stebuch -2007-05-17 0.25 30.8625 G��stebuch -2007-05-17 1.25 154.3125 G��stebuch -2007-05-18 3.0 370.35 G��stebuch -2007-05-18 1.75 216.0375 G��stebuch +2007-05-07 1.0 123.45 Task 1 +2007-05-07 1.75 216.0375 Task 1 +2007-05-07 1.0 123.45 Task 2 +2007-05-08 1.0 123.45 Task 2 +2007-05-08 1.0 123.45 Task 3 +2007-05-08 0.5 61.725 Task 3 +2007-05-14 0.5 61.725 Task 3 +2007-05-14 0.5 61.725 Task 3 +2007-05-15 1.0 123.45 Task 3 </code> </pre> <p>With the newly written methods</p> @@ -133,20 +122,20 @@ <p>you can change line 8 from</p> <pre> <code> - 8 4.upto(1000) do |line| + 4.upto(12) do |line| </code> </pre> <p>to</p> <pre> <code> - 8 4.upto(oo.last_row) do |line| + 4.upto(oo.last_row) do |line| </code> </pre> <h3>Using MS-Excel spreadsheets</h3> @@ -154,11 +143,11 @@ <p>You can also access MS-Excel spreadsheat.</p> Replace Openoffice with <pre> -<code>oo = Excel.new("/home/tp/Desktop/simple_spreadsheet.xls"). +<code>oo = Excel.new("simple_spreadsheet.xls"). </code> </pre> <p>all methode are the same for OpenOffice and Excel-objects. The only difference @@ -204,13 +193,14 @@ <h2>Thanks</h2> <ul> <li><a href="http://rubyforge.org/users/nicwilliams/">Dr Nic Williams</a> for his wonderful gem &#8216;<a href="http://rubyforge.org/projects/newgem/">newgem</a>&#8217; which makes it very convenient to create, manage and publish Ruby gems</li> - <li>for the Excel-part the &#8216;parseexcel&#8217; gem is used. My functions are a convenient wrapper around the functions of this gem</li> + <li>for the Excel-part the &#8220;spreadsheet&#8217;:http://rubyforge.org/projects/spreadsheet/ gem is used. My functions are a convenient wrapper around the functions of this gem</li> + <li>Dirk Huth f&uuml;rs Testen unter Windows</li> </ul> <p class="coda"> - <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 1st June 2007<br> + <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 5th June 2007<br> Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a> </p> </div> <!-- insert site tracking codes here, like Google Urchin -->