Hi. I’ve just started to explore PHP and this tool. However, using the code below, I got the “Fatal error: Call to undefined method SpreadSheetCell::setText() in …” error. Anyone knows why? Any help is much appreciated! Thanks in advance.
[code]<?php
require_once(“wp-content/plugins/spreadsheet/codebase/php/api.php”);
require_once(“wp-content/plugins/spreadsheet/codebase/php/config.php”);
$res = mysql_connect($db_host.":".$db_port, $db_user, $db_pass);
mysql_select_db($db_name, $res);
$sh = new SpreadSheet($res, “1”, $db_prefix, $db_type);
$sh->setText(“A1”,“red”);
echo ‘[[spreadsheet?&id=1]]’;
?>[/code]