I just want to say:
This is not an issue with Angular but a limitation of Javascript.
Javascript uses double floating point numbers internally which means you're
limited to that formats precision for integer:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER

This is a limitation of the standard and not specific to Angular or any
plugin/addon.


On Wed, Aug 8, 2018 at 10:12 AM Charul Chavda <charul2...@gmail.com> wrote:

> Hi,
>
> Change data type of your big number as string and not number, should
> resolve the issue
>
> Regards,
> Charul
>
> On Wednesday, August 8, 2018, vishnu siddareddy <vishnu.hmi...@gmail.com>
> wrote:
>
>> I am using Angular2Csv library for upload JSON data to CSV form. But the
>> big number is showing in exponential format in excel sheet.
>>
>> Number 3530123456789010 becomes like, 3.53012E+15
>>
>> Is there any solution to avoid that?
>>
>>
>> exportToCSV = function (dataobj) {    const options = {
>>           fieldSeparator: ',',
>>           quoteStrings: '"',
>>           decimalseparator: '.',
>>           showLabels: true,
>>           showTitle: true,
>>           headers: Object.keys(dataobj.data[0])
>>         };
>>        // console.log(JSON.stringify(data));
>>        new Angular2Csv(dataobj.data, 'My Report', options);}
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Angular and AngularJS discussion" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to angular+unsubscr...@googlegroups.com.
>> To post to this group, send email to angular@googlegroups.com.
>> Visit this group at https://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Angular and AngularJS discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH <http://ehr.meditech.com/>
781-774-2293

-- 
 <https://ehr.meditech.com/expanse>             
<https://www.linkedin.com/company/meditech>   
<https://twitter.com/MEDITECH>   <https://www.facebook.com/MeditechEHR>

Subscribe 
<https://info.meditech.com/get-great-meditech-content?hsCtaTracking=864299ec-5abf-4004-9c6d-2d051794101f%7Cc911be42-538a-4a48-8dca-a6d4001c6326>
 
to receive emails from MEDITECH or to change email preferences.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to