如何使用WordPress $ wpdb而不包含发送http标头的文件? [重复]

Possible Duplicate:
Include wp-blog-header.php without headers so I can use phpexcel?

I'm trying to use $wpdb results to output an excel file w/ Phpexcel, however as you might guess there are header wars raging. Is it possible to use $wpdb without including a file that sets headers already? How? Thanks.

I usually use this which doesn't send headers:

require_once '/path/to/wordpress/wp-load.php';

Example which works and outputs no errors:

<?php

error_reporting(E_ALL);
ini_set('display_errors', 1);

echo "Hello<br />";

require_once '/PATH/TO/wp-load.php';

echo "After require...<br />";

var_dump($wpdb);