KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

How to handle large number (> 16 digits) when download excel #2199

Open Yonathan opened this topic on on Jul 12, 2021 - 3 comments

Yonathan commented on Jul 12, 2021

Hi guys, I need your help to suggest how to handle this large number not converted with E+...

Sebastian Morales commented on Jul 13, 2021

If your column is of type "number" Excel can not handle precision larger than 16 digits anyway. Thus, change your column meta's type to "string" would help keeping all the digits even if the cell's format is not numeric anymore. Rgds,

daniel chandra commented on Jul 14, 2021

Hi, i just encounter the same problem and try to add meta type "string" and it's not working Somehow excel still read it as number instead of string, or maybe i did it wrong

...
->pipe(new Map([
                "{meta}" => function($meta) {
                    $meta['columns']['columnName'] = array(
                        'type' => "string",
                    );

                    return $meta;
                }
            ]))->pipe($this->dataStore('user'));
Sebastian Morales commented on Jul 15, 2021

Is your column name really "columnName":

                    $meta['columns']['columnName'] = array(
                        'type' => "string",
                    );

Pls replace the string "columnName" here with your 16-digit column's real name. Tks,

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed
suggestion

Excel