Download xls file in app browser?

Guys,
I`m trying to load a excel file from a webservice using NgCordova In App Browser.
The webservice returns a Stream and I set the return content type to "application/vnd.ms-excel"
It seems to work when I use Chrome and Ripple but nothing happens when running from iOS or Android.
What am I doing wrong?
How can I make it work?

This is the piece of code to make the call to webservice:

var string = ‘http://10.1.25.56/Triacao.WAP/SVCTriacaoMobile.svc/DownloadPlanilhaTreino?param1=test.xls’;

                            $cordovaInAppBrowser
                                .open(string, '_blank')
                                .then(function (event) {
                                    // success
                                }, function (event) {
                                    // error
                                });

You have to use cordova FileTransfer plugin to download a file. Also check the FileSystem plugin documentation to determine the directory for your file. Directory to download file is different for each platform.

Will I be able to show the file inside the app?

Ok guys, I made it work on iOS using inApp Browser but on Android and WP8 I get a blank/white screen.
Any solution for this?

1 Like

DId you make it with inAppBrowser for iOS?

Can you share the code?

Thank you.