Databases Reference
In-Depth Information
This functionality relies on the PEAR module Spreadsheet_Excel_Writer , which
is currently at version 0.9.1 and generates Excel 5.0 format files. This module is
documented at http://pear.php.net/package/Spreadsheet_Excel_Writer , but
the complete installation in phpMyAdmin's context is documented here:
1.
Ensure that the PHP server has PEAR support. (The pear command will fail
if we do not have PEAR support.) PEAR itself is documented at
http://pear.php.net .
2.
If we are running PHP in safe mode, we have to ensure that we are allowed
to include the PEAR modules. Assuming the modules are located under; /
usr/local/share/pear , we should have the line safe_mode_include_dir
= /usr/local/share/pear in php.ini .
3.
We then install the module with: pear -d preferred_state=beta install
-a Spreadsheet_Excel_Writer (because the module is currently in beta
state). This command fetches the necessary modules over the Internet and
installs them into our PEAR infrastructure.
4.
We need a temporary directory—under the main phpMyAdmin
directory—for the .xls generation. It can be created on a Linux system with:
mkdir tmp ; chmod o+rwx tmp .
5.
We set the $cfg['TempDir'] parameter in config.inc.php to './tmp' .
We should now be able to see the new Native MS Excel data export choice.
Open Document Spreadsheet
This spreadsheet format is a subset of the Open Document ( http://en.wikipedia.
org/wiki/OpenDocument ), which was made popular with the OpenOffice.org office
suite. We need to choose only one table to be exported in order to have a coherent
spreadsheet. Here is our author table, exported into a file named author.ods
subsequently looked at from OpenOffice:
 
Search WWH ::




Custom Search