previousFormat::setShadow (Previous) (Next) Format::setFontFamilynext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Format::setScript

Format::setScript – Sets the script type of the text

Synopsis

require_once "Spreadsheet/Excel/Writer.php";

void Format::setScript ( integer $script )

Description

Sets the script type of the text

Parameter

  • integer $script - The value for script type. Possible values are 1 => superscript, 2 => subscript.

Note

This function can not be called statically.

Example

Using setScript()

<?php
require_once 'Spreadsheet/Excel/Writer.php';

  
$workbook = new Spreadsheet_Excel_Writer();
  
// creating the formats
  
$format_superscript =& $workbook->addFormat();
  
$format_superscript->setScript(1);
  
$format_subscript =& $workbook->addFormat();
  
$format_subscript->setScript(2);

  
$worksheet =& $workbook->addWorksheet();
  
$worksheet->write(00"This is superscript"$format_superscript);
  
$worksheet->write(10"This is subscript"$format_subscript);
?>
previousFormat::setShadow (Previous) (Next) Format::setFontFamilynext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.