Hello

I wanting to update the sheetnode cell value from external file. i have one file with php core coding in drupal installation root directory that in which i want to access the cell value of specific sheet and with some calculation i wants to update that cell values of that sheet.

It's just like to access and update sheet data by external file.

I'm just stuck on this point, Please help me on this.

Thanks,

Comments

nitin4net’s picture

Version: 6.x-1.5 » 6.x-1.x-dev
infojunkie’s picture

What do you mean by external file? An Excel sheet?

infojunkie’s picture

Removing unneeded tags.

nitin4net’s picture

No, it's not an excel file it's just simple php file. like say fetchcellvalue.php, this file will have a script that will fetch the cell value of sheet and will also update that value.

please help with sample code to fetch cell value.

infojunkie’s picture

Status: Active » Fixed

You need to implement a new spreadsheet function (in JavaScript) that makes an AJAX call to your file (or better yet, to your custom Drupal module).

For an example, check out sheetnode.js, function Drupal.sheetnode.functionsSetup. This function declares 2 new functions, ORG.DRUPAL.FIELD and ORG.DRUPAL.TOKEN. They are implemented in Drupal.sheetnode.functionDrupalField and Drupal.sheetnode.functionDrupalToken respectively.

The user calls these functions in a cell, e.g. =ORG.DRUPAL.FIELD('title', 200, 'node'). The spreadsheet responds by calling the corresponding JavaScript function. Notice how each function obtains user parameters (as entered in the cell) and makes an AJAX call to the backend to get the result. The result is passed back to the spreadsheet in the AJAX success function.

You can find the backend implementation of these functions in sheetnode.module. The hook_menu implementation declares the paths expected by the frontend, and the functions are implemented in _sheetnode_ajax_field and _sheetnode_ajax_token respectively.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

suresh7787’s picture

Hi,
I need to insert the values from a node table into A cell. How can I do it?
Can anyone help me?