Prev
Format
ExcelExplorer Manual Next
Image


ExcelExplorer::FormatsList

(ExcelExplorer 4.0)

Returns formats array (array of EEFormat objects) for all defined formats.

array(EEFormat) FormatsList(  )
Parameters
None
Description

Returns continuous array (array of EEFormat objects) for all defined numeric formats except some build-in formats. Do not think about array keys as format indexes. To obtain format index use EEFormat->Index() method.

Note that some build-in formats are not stored in Excel file. This method returns only defined formats. Therefore the method EEFormat->String() called for any of array elements will always returns valid EEData object because no buil-in formats included in array.

See EEFormat class description for more information about build-in formats.

Array always returned, however it can be empty if no formats stored in Excel file.

Print all defined formats


<?php


$formats 
$ee->FormatsList();

for( 
$i=0$i<count($formats); $i++ ) {

  echo 
'Format index: '.$formats[$i]->Index()."\n";

  
// note that no checking for String() can returns FALSE - it always returns valid object in this context
  
echo 'Format string: '.$formats[$i]->String()->UTF8()."\n\n";

}

?>

 
Prev
Format
Home
Up
Next
Image

 
© 2002-2009 EEPHP.com
All Rights Reserved.