Undefined method SpreadSheetCell::setText()

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. :smiley:

[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]

This code was run on Wordpress 3.5.1 by the way.

Hi,
please, try to update file wp-content/plugins/dhtmlxspreadsheet/codebase/php/api.php from attachment.
This fix will be added in official release.
Thanks for your feedback!
api.zip (2.79 KB)