Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 11th, 2012  |  syntax: None  |  size: 0.59 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Spreadsheet_Excel_Writer PEAR PHP - Generating with junk characters
  2. // Creating a workbook
  3.                 $workbook = new Spreadsheet_Excel_Writer();
  4.  
  5.                 // sending HTTP headers
  6.                 $workbook->send('test.xls');
  7.  
  8.                 // Creating a worksheet
  9.                 $worksheet =& $workbook->addWorksheet('My first worksheet');
  10.  
  11.                 // The actual data
  12.                 $worksheet->write(0, 0, 'Name');
  13.                 $worksheet->write(0, 1, 'Age');
  14.  
  15.                 // my database res
  16.  
  17.                 // Let's send the file
  18.                 $workbook->close();