question

Upvotes
1 0 1 1

how to upload and download excel file on client side local folder in angularjs?

angular
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
39.2k 75 11 27

@sandeshsonikar2018
This portal is aimed at software developers utilizing Thomson Reuters APIs. Is your question related to any Thomson Reuters APIs? If yes, could you specify which Thomson Reuters API or which Thomson Reuters product you're using?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 0 0

I had the same problem and spend many hours find different solutions for AngularJS code,

You can do something like this using Blob.


<a download="content.txt" ng-href="{ { url }}">download</a>


in your controller:


var content = 'file content for example';

var blob = new Blob([ content ], { type : 'text/plain' });

$scope.url = (window.URL || window.webkitURL).createObjectURL( blob );


in order to enable the URL:


app = angular.module(...);

app.config(['$compileProvider',

function ($compileProvider) {

$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|file|blob):/);

}]);



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea