Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

How to generate an Excel Spreadsheet from REBOL.

 [1/2] from: rebol::optushome::com::au at: 16-Jan-2002 21:59

Thought this might be usefull for others who want to do quick output of Excel spreadsheets from REBOL . Windows only :-( Watch the line wrapping!... REBOL [ Author: "Allen Kamp" Email: [allen--rebolforces--com] Date: 12-Dec-2001 Purpose: {Show how excel sheet can be created dynamically from html content in a file with .xls file extension on machines where excel is installed. Note the sum calculations.} ] data: [ <table border="1"> <tr><th width="100"> "State" </th><th width="100">"Jan"</th><th width="100">"Feb"</th><th width="100">"Mar"</th><th width="100">"Total"</th></tr> <tr><td> "QLD" </td><td> $400.00 </td><td> $500.00 </td><td> $600.00 </td><td> "=sum(B2:D2)" </td></tr> <tr><td> "NSW" </td><td> $430.00 </td><td> $660.00 </td><td> $600.00 </td><td> "=sum(B3:D3)" </td></tr> <tr><td> "VIC" </td><td> $200.00 </td><td> $300.00 </td><td> $900.00 </td><td> "=sum(B4:D4)" </td></tr> <tr><td colspan="5"> </td></tr> <tr><th></th><th> =sum(B2:B4) </th><th>"=sum(C2:C4)"</th><th>"=sum(D2:D4)"</th><th>"=sum(E2:E 4)"</th></tr> </table> ] write %demo.xls data browse %demo.xls

 [2/2] from: doug:vos:eds at: 16-Jan-2002 10:01

Very cool. Nicer than generating .CSV files. Works great after fixing two lines that got munged from emailing. Thanks Allen!!