1
我有一个表格,它有4个数据..谷歌电子表格API和Codeigniter
现在我收到$ _POST的数据。我想把它放到谷歌电子表格使用他们的API ..但我太新手了解代码..
我只是achived把谷歌客户端API codeigniter,但我不知道如何使用它。
我的代码是这个样子..
$this->load->library('google');
$values = array(
array(
$this->input->post('name'),
$this->input->post('email'),
$this->input->post('reason'),
$this->input->post('mobile'),
date('Y-m-d')
)
);
$body = new Google_Service_Sheets_ValueRange(array(
'values' => $values
));
// $params = array(
// 'valueInputOption' => $valueInputOption
//);
$result = $this->google->spreadsheets_values->update("1gg8rHsKM3DhMaJVY-YexQyggAoq1pUCB5LpP5NFah8A", "Sheet1!A2:E2", $body, "");
我不知道是什么的参数是用于,所以我留空白..
我运行此代码,并得到错误Message: Undefined property: Google::$spreadsheets_values