(ExcelExplorer 4.1)
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:
|
||||||||||||||||||||||||||||||||||||||||||||||||
| 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):
|
||||||||||||||||||||||||||||||||||||||||||||||||
| 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:
|
||||||||||||||||||||||||||||||||||||||||||||||||
| 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. |
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";
}
?>