Prev ImagesList |
ExcelExplorer Manual |
Next Helper |
 |
(ExcelExplorer 4.1)
Returns summary information of the document.
array SummaryInformation( )
Parameters
- None
Description
Returns array with document's summary information of 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
|
| 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 |
|
| 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 |
Document title. |
| SUBJECT |
String |
Document subject. |
| AUTHOR |
String |
Document author. |
| LASTAUTHOR |
String |
Last user editing the document. |
| COMMENTS |
String |
Document comments. |
| KEYWORDS |
String |
Document keywords. |
| TEMPLATE |
String |
Template used for document creation. Usually Excel not using this property. |
| CREATE_DTM |
Date array |
Date when document have been created. |
| LASTSAVE_DTM |
Date array |
Date when document have been saved. |
| LASTPRINTED |
Date array |
Date when document have been printed. |
| REVNUMBER |
String |
Revision number is the number of times the File/Save command has been called on this document. |
| PAGECOUNT |
Integer |
Number of pages in the document (used by MS Word). |
| WORDCOUNT |
Integer |
Number of words in the document (used by MS Word). |
| CHARCOUNT |
Integer |
Number of characters in the document (used by MS Word). |
| THUMBNAIL |
String |
Thumbnail of the document. This image stored in the Windows Metafile format as a raw binary data. |
| APPNAME |
String |
Application used to produce the document (e.g. "Microsoft Excel", "Microsoft Office Word"). |
| DOC_SECURITY |
Integer |
1 if document is password-protected, 0 otherwise. |
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";
}
?>
|