none
Access excel document from JavaScript API for Office RRS feed

  • Question

  • Hi,

    I would like to know if there is a way to access the excel document from JavaScript API for Office.

    We are currently developing a Task Pane App for excel and there is a requirement to send the excel document object when saving the data from task pane app.

    Also, I would like to know if there is a way to access the current user's files and folders from Javascript Office Api

    Thanks.


    VAISAR

    Friday, July 22, 2016 3:21 PM

Answers

  • Hi VAISAR,

    >> I will not be able to access entire excel workbook as an object (binary object) from the task pane web app opened in the excel workbook

    Based on File object, it seems you are right, we could not access the binary object for that it only support PowerPoint and Word.

    >> The other way is (even though it is out of scope here) save the excel opened. And access the saved excel sheet from task pane web app.

    Do you mean you save it manually or by code? If you mean you save it to local disk manually, it seems you could access it by javascript as my first reply. But there is no built-in office function to achieve this, you need javascript library to achieve this, and as you have known, this is out of scope here.

    If this is a new feature you want to include in the future, I would suggest you submit a feedback in the link below:

    Referemce: http://officespdev.uservoice.com

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Marked as answer by VAISAR Wednesday, July 27, 2016 7:58 PM
    Wednesday, July 27, 2016 5:19 AM

All replies

  • Hi VAISAR,

    >> I would like to know if there is a way to access the excel document from JavaScript API for Office.

    What is the excel document? Is it the excel file which office add in (app for office) stored or a file in the user’s disk? If it is previous one, I think you could try Document.getFileAsync method to get current excel file, but it only support Excel online. If it is the later one, there is no office add in api to achieve this. Since Office add ins are manifest and web application, I suggest you check how to access user’s file in web application, but it is out of scope in this forum.

    The link below might be useful to you.

    # How to open a local disk file with Javascript?

    http://stackoverflow.com/questions/3582671/how-to-open-a-local-disk-file-with-javascript

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Saturday, July 23, 2016 6:44 AM
  • Hi Edward,

    The excel document I am talking about is the excel workbook opened with the task pane web app. 

    From the above, what I would infer is, I will not be able to access entire excel workbook as an object (binary object) from the task pane web app opened in the excel workbook. 

    The other way is (even though it is out of scope here) save the excel opened. And access the saved excel sheet from task pane web app. 

    Please correct me if I am wrong and thanks for your reply.


    VAISAR

    Tuesday, July 26, 2016 1:36 PM
  • Hi VAISAR,

    >> I will not be able to access entire excel workbook as an object (binary object) from the task pane web app opened in the excel workbook

    Based on File object, it seems you are right, we could not access the binary object for that it only support PowerPoint and Word.

    >> The other way is (even though it is out of scope here) save the excel opened. And access the saved excel sheet from task pane web app.

    Do you mean you save it manually or by code? If you mean you save it to local disk manually, it seems you could access it by javascript as my first reply. But there is no built-in office function to achieve this, you need javascript library to achieve this, and as you have known, this is out of scope here.

    If this is a new feature you want to include in the future, I would suggest you submit a feedback in the link below:

    Referemce: http://officespdev.uservoice.com

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Marked as answer by VAISAR Wednesday, July 27, 2016 7:58 PM
    Wednesday, July 27, 2016 5:19 AM