OneDrive file link open issue with windows File Explorer/Picker

Hashir Sheikh 1 Reputation point
2021-09-15T10:14:00.09+00:00

Hi, I am working with office-js add-in with taskpane app. In my application we are using file picker by following code.

<input type='file' accept='.csv, .xls'/>

The problem is that I am unable to read the file from OneDrive shared link. Please check the following screenshot to show the process that how I am doing this.

132379-image.png

132365-image.png

After click open I just read the file using JavaScript file read techniques. following screenshot will describe that what kind of data we are getting.

132393-image.png

In general case of file selection we are getting binary data but here I am getting html data.

Please help me to figure it out, what is the correct way to handle the OneDrive shared file link with window's file picker.

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
867 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,487 questions
{count} votes