Skip to content

Exporting to CSV file using uiGridExporter , NOT working in IE 11 #5321

Open
@avinashhota

Description

@avinashhota

I am trying to use the Export feature provided by UI Grid, but, export to CSV file is not working in IE 11. But the same works in Fire fox. Please try opening the plunker in IE

http://plnkr.co/edit/en4c9DZ3308h4MhSqrZi?p=preview
Need your attention on the mentioned issue. Thanks

Activity

PaulL1

PaulL1 commented on Apr 14, 2016

@PaulL1
Contributor

Unfortunately I don't have IE11, and I don't think many of the other devs do either. That means you'll need to do a bit more diagnostics on your own to provide information.

Where exactly does it throw errors (if anywhere). Does it create the docObject, is it the same on Firefox and on IE11? There is specific IE logic in the code, does it correctly detect IE and enter that logic? Does that logic work as expected? If not, is there information on the web about some new change in IE that would have broken that logic?

Bharathjt

Bharathjt commented on Apr 18, 2016

@Bharathjt

Hi PaulL1,
I am also facing the same issue , I saw it working in the 3.0.1 version , but it is not working in 3.1.1 .
The issue seems to be the isIE function has been revised in 3.1.1 which is not returning 11 as before. I tried using the old isIE function in 3.1.1 , it works in IE11.
isIE() in 3.0.1.:
isIE: function () { var match = navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/); return match ? parseInt(match[1]) : false; },
isIE() in 3.1.1 :
isIE: function () { var match = navigator.userAgent.search(/(?:Edge|MSIE|Trident\/.*; rv:)/); var isIE = false; if (match !== -1) { isIE = true; } return isIE; },

PaulL1

PaulL1 commented on Apr 18, 2016

@PaulL1
Contributor

OK, I didn’t do that change, but I can see that the match string looks a bit different than before, clearly aiming to cover Edge as well as IE. Perhaps see if you can adjust the match string for the 3.1.1 version to correctly detect IE 11 whilst not breaking the other variants?

Paul Lambert
Program Director NTS
021 385 488

From: Bharathjt <notifications@github.commailto:notifications@github.com>
Reply-To: angular-ui/ui-grid <reply@reply.github.commailto:reply@reply.github.com>
Date: Monday, 18 April 2016 at 6:01 PM
To: angular-ui/ui-grid <ui-grid@noreply.github.commailto:ui-grid@noreply.github.com>
Cc: Paul Lambert <paul@planar.id.aumailto:paul@planar.id.au>
Subject: Re: [angular-ui/ui-grid] Exporting to CSV file using uiGridExporter , NOT working in IE 11 (#5321)

Hi PaulL1,
I am also facing the same issue , I saw it working in the 3.0.1 version , but it is not working in 3.1.1 .
The issue seems to be the isIE function has been revised in 3.1.1 which is not returning 11 as before. I tried using the old isIE function in 3.1.1 , it works in IE11.
isIE() in 3.0.1.:
isIE: function () {
var match = navigator.userAgent.match(/(?:MSIE |Trident/.; rv:)(\d+)/);
return match ? parseInt(match[1]) : false;
},
isIE() in 3.1.1 :
isIE: function () {
var match = navigator.userAgent.search(/(?:Edge|MSIE|Trident/.
; rv:)/);
var isIE = false;
if (match !== -1) {
isIE = true;
}
return isIE;
},


You are receiving this because you commented.
Reply to this email directly or view it on GitHubhttps://github.com//issues/5321#issuecomment-211217979

Alfinch

Alfinch commented on Aug 26, 2016

@Alfinch

The current isIE() function now can only return true or false, and it returns true for all versions of IE and Edge.

In the downloadFile() method the returned value is used here:

ieVersion = this.isIE();
if (ieVersion && ieVersion < 10) { ... }

ieVersion < 10 evaluates to true if ieVersion is true, so the code intended for IE9 and below is called for all versions of IE.

Reverting to the old isIE method from 3.0.1 fixes this issue in Edge, IE11 and IE10.

self-assigned this
on Apr 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @Alfinch@PaulL1@mportuga@avinashhota@Bharathjt

      Issue actions

        Exporting to CSV file using uiGridExporter , NOT working in IE 11 · Issue #5321 · angular-ui/ui-grid