Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible to write custom functions #158

Open
cleesmith opened this issue Jan 19, 2015 · 5 comments
Open

is it possible to write custom functions #158

cleesmith opened this issue Jan 19, 2015 · 5 comments
Labels

Comments

@cleesmith
Copy link

Is it possible to write custom functions for ethercalc ?
If yes, how?

I would like to add functions similar to google spreadsheets, such as:
=importxml(A1, "//p[@class='myforecast-current-lrg']")

... or:

=ImportData("http://gmaps-samples.googlecode.com/svn/trunk/articles-csvtokml/google-addresses.csv")
@ghost
Copy link

ghost commented Mar 31, 2015

If not, is there a plugin architecture? Not seen in docs yet.

@audreyt
Copy link
Owner

audreyt commented Jul 29, 2015

There is one in 001c277 but I'd suggest using Ajax in the browser to retrieve JSON or CSV, and then use the REST API (http://docs.ethercalc.apiary.io/) to fill in data.

You can e.g. have another server get a HTTP request from the client and put it into a certain cell using the set A1 text t sometext command (use the Audit tab to see the command syntax corresponding to operations).

Or you can have the button retrieve the value over Ajax and run a

window.spreadsheet.context.sheetobj.ScheduleSheetCommands("...")

Where the … is the same set command.

@Pegbiter
Copy link

@audreyt do you have a simple example of implementing a custom server this way? Even if UDF Excel is impossible, I would like to store an expression in a cell and evaluate the result and update the sheet.

@audreyt
Copy link
Owner

audreyt commented Dec 27, 2016

Sorry I have no examples of such a periodically-update-certain-cell server at hand — folks please feel free to chime in.

@eddyparkinson
Copy link
Collaborator

eddyparkinson commented Dec 28, 2016

@Pegbiter what do you want the UDF to do?

Update with value
To update the sheet with the result of an expression
http://sheet.cellmaster.com.au/example_command

other example
http://sheet.cellmaster.com.au/examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants