Closed (fixed)
Project:
Sheetnode
Version:
6.x-1.x-dev
Component:
Core
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Jun 2011 at 16:48 UTC
Updated:
29 May 2012 at 11:01 UTC
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
Comment #1
nitin4net commentedComment #2
infojunkieWhat do you mean by external file? An Excel sheet?
Comment #3
infojunkieRemoving unneeded tags.
Comment #4
nitin4net commentedNo, 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.
Comment #5
infojunkieYou 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.FIELDandORG.DRUPAL.TOKEN. They are implemented inDrupal.sheetnode.functionDrupalFieldandDrupal.sheetnode.functionDrupalTokenrespectively.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_menuimplementation declares the paths expected by the frontend, and the functions are implemented in_sheetnode_ajax_fieldand_sheetnode_ajax_tokenrespectively.Comment #7
suresh7787 commentedHi,
I need to insert the values from a node table into A cell. How can I do it?
Can anyone help me?