0

Anyone has idea on retrieving the selected text from excel access web part in SharePoint using javascript API?

Requirement: I have an Excel sheet which has a big matrix (multiple rows and columns). Based on user selection (range or cells or column) we should be able to show the data related to the selected text, below in another web part. Means we have code that takes the selected text as input and go and get data using other rest api's and will load content on the page. As we are unable to replicate the same UI using HTML/CSS (more complex and more maintenance) I am planning to use the excel directly.

Throw some ideas if there are any workarounds. Thanks in advance.

1

We use the following EWA event extensively to get the text of the selected cell: Ewa.EwaControl.add_activeCellChanged(function) https://msdn.microsoft.com/en-us/library/ee589067.aspx The example shows how to get the value. If you want to capture user changes, use: Ewa.Workbook.add_sheetDataEntered(function) https://msdn.microsoft.com/en-us/library/jj713599.aspx

Microsoft has not updated the EWA Namespace in years. I am often concerned that Microsoft will stop supporting it (I hope they continue to improve it). It is being replaced by other more powerful (but less flexible in many scenarios) Excel APIs such as Office.js add-ins and the Graph REST API.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.