ExcelExplorer Pro Manual

ExcelExplorer Manual
ExcelExplorer
Prev
ImagesList
Next
Helper

ExcelExplorer::SummaryInformation

(ExcelExplorer 4.1)

Returns summary information of the document.
array SummaryInformation( )

Parameters

None

Description

Returns array with document's summary information or FALSE if no summary information found. It also returns FALSE if file have been explored with read_filter set without EE_READ_SUMMARY.

Summary information contains data about excel file creation date, last modified date, thumbnail, what OS used to create excel file and other. This method returns array that contains these data. Note that you can use this method not only for Excel file but for ANY MS Office files (like MS Word .doc files)! To do this set read_filter to EE_READ_SUMMARY before exploring.

Array keys identifies what data returned and values is the data itself. Below is the list of possible keys and values. Note that not all data stored in the array - some keys can be omitted.

The Date array type used for storing date and time values in the array of the following structure:

Key Value type
year Integer
month Integer
day Integer
hour Integer
min Integer
sec Integer


Summary information array:

Key Value type Description
OS Array Operating system used when document have been saved. The system information stored in the array of the following structure:

Key Value type Description
TYPE Integer 0 - Windows 3.1/3.11,
1 - Macintosh,
2 - Windows 95/98/ME/NT/2000/XP/2003/Vista/Server 2008/Windows 7
VERSION Array Major and minor version number of the operating system. Stored in the array of the following structure:

'VERSION' => array(
  'MAJOR' => major version number,
  'MINOR' => minor version number
);

Typical values for different operating systems are:

OS MAJOR MINOR
Macintosh unused unused
Windows 3.1 3 10
Windows 3.11 3 11
Windows 95 or Windows NT 4.0 4 0
Windows 98 4 10
Windows Millenium 4 90
Windows NT 3.51 3 51
Windows 2000 5 0
Windows XP 5 1
Windows Server 2003 Family 5 2
Windows Vista / Windows Server 2008 / Windows 7 6 0
NAME String OS name based on type and version, e.g. "Windows XP".
CODEPAGE Integer Codepage used for all string data stored in this array. If omitted default codepage is used.
TITLE String The title of the document.
SUBJECT String The subject of the document.
AUTHOR String The author of the document.
LASTAUTHOR String The last author of the document.
COMMENTS String Comments related the document.
KEYWORDS String Keywords related to the document.
TEMPLATE String The application-specific template from which the document was created. Usually Excel not using this property.
CREATE_DTM Date array The time that the document was created.
LASTSAVE_DTM Date array The most recent time that the document was saved.
LASTPRINTED Date array The most recent time that the document was printed.
REVNUMBER String An application-specific revision number for this version of the document.
PAGECOUNT Integer The total number of pages in the document.
WORDCOUNT Integer The total number of words in the document.
CHARCOUNT Integer The total number of characters in the document.
THUMBNAIL String Application-specific clipboard data containing a thumbnail representing the document's contents. May be absent. Typically image stored in the Windows Metafile format (WMF) as a raw binary data.
APPNAME String The name of the application that was used to create the document (e.g. "Microsoft Excel", "Microsoft Office Word").
DOC_SECURITY Integer Representing a set of application-suggested access control flags with the following values (0 - no protection):

Value Description
1 Password protected
2 Read-only recommended
4 Read-only enforced
8 Locked for annotations
CATEGORY String A text string typed by the user that indicates what category the file belongs to (memo, proposal, and so on). It is useful for finding files of same type.
PRESFORMAT String Target format for presentation (35mm, printer, video, and so on). May be ignored. Must be one of the following values:
  • Empty string
  • On-screen Show
  • On-screen Show (4:3)
  • Letter Paper (8.5x11 in)
  • Ledger Paper (11x17 in)
  • A3 Paper (297x420 mm)
  • A4 Paper (210x297 mm)
  • B4 (ISO) Paper (250x353 mm)
  • B5 (ISO) Paper (176x250 mm)
  • B4 (JIS) Paper (257x364 mm)
  • B5 (JIS) Paper (182x257 mm)
  • Hagaki Card (100x148 mm)
  • 35mm Slides
  • Overhead
  • Banner
  • Custom
  • On-screen Show (16:9)
  • On-screen Show (16:10)
BYTECOUNT Integer Number of bytes.
LINECOUNT Integer Number of lines.
PARCOUNT Integer Number of paragraphs.
SLIDECOUNT Integer Number of slides.
HIDDENCOUNT Integer Number of slides that are hidden.
NOTECOUNT Integer Number of pages that contain notes.
MMCLIPCOUNT Integer Number of sound or video clips.
MANAGER String Manager of the project.
COMPANY String Company name.
CCHWITHSPACES Integer Specifies an estimate of the number of characters in the document, including whitespace.
VERSION String Specifies the version of the application that wrote the property set storage.
CONTENTTYPE String Specifies the content type of the file.
CONTENTSTATUS String Specifies the document status.

Examples

1. Print document's summary information

<?php

  $suminfo 
$ee->SummaryInformation();
  if( !
is_array($suminfo) ) {
    die(
"No summary information found.");
  }

  foreach( 
$suminfo as $key => $value ) {
    if( 
$key == 'OS' ) {

      
// print operating system information
      
print 'OS type: '.$value['TYPE']."\n";
      print 
'OS major version: '.$value['VERSION']['MAJOR']."\n";
      print 
'OS minor version: '.$value['VERSION']['MINOR']."\n";
      print 
'OS name: '.$value['NAME']."\n";

    } elseif( 
$key == 'THUMBNAIL' ) {

      
// skip printing thumbnail
      // see next example

    
} elseif( is_array($value) ) {

      
// print formatted date and time
      
print $key.': ';
      print 
date('M',mktime(0,0,0,$value['month'])).' '.$value['day'].', '.$value['year'];
      print 
' '.date('G:i:s',mktime($value['hour'],$value['min'],$value['sec'])).' GMT';
      print 
"\n";

    } else {

      
// print string or integer value
      
print $key.': '.$value."\n";

    }
  }

?>


2. Print document's thumbnail for viewing in the web browser

<?php

  $suminfo 
$ee->SummaryInformation();
  if( !
is_array($suminfo) ) {
    die(
"No summary information found.");
  }

  if( isset(
$suminfo['THUMBNAIL']) ) {

    
header("Content-type: image/x-wmf");
    print 
$suminfo['THUMBNAIL'];

  } else {

    print 
"There is no thumbnail for this document";

  }

?>

ExcelExplorer Manual
ExcelExplorer
Prev
ImagesList
Next
Helper