Home » excel » php – Import excel/csv file using ethercalc API

php – Import excel/csv file using ethercalc API

Posted by: admin May 14, 2020 Leave a comment


I want to import an excel/csv file into ethercalc using curl not drop file.
Which url of ethercalc I need to use to PUT a file to?
Here is the open source website

How to&Answers:

As of today’s version, EtherCalc 0.20150103.1 now supports importing multi-sheet Excel (and OpenDocument Spreadsheets) via this REST API:

curl -i -X PUT --data-binary @file.xlsx http://HOST/=file.xlsx

If you only need to import the first worksheet in the Excel file, this should also work:

curl -i -X PUT --data-binary @file.xlsx http://HOST/_/file

Hope this helps!


There is an API docs with examples for different programming languages: http://docs.ethercalc.apiary.io/

BTW you could use next command for importing csv to spreadsheet:

curl --include --request PUT \ 
--header "Content-Type: text/csv" \ 
--data @table.csv http://server/_/table_name

I’m not sure that you could import xls file, but you can convert it to socialcalc format and import after that.