KoolReport's Forum

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

Koolreport Big Spreadsheet Exporting Excel SUM Problem #3203

Closed Oya Kaynar opened this topic on on Dec 5, 2023 - 2 comments

Oya Kaynar commented on Dec 5, 2023

Hello, we want to transfer data from PostgreSQL to Excel; however, we are unable to perform summation in Excel because there is a period in "decimal" values. When we manually change the periods to commas in the columns, the summation works; however, PostgreSQL does not transfer values with commas. Can you assist us with this issue? Ultimately, we are unable to sum the columns with numerical values in the Excel file we exported as "Big Spreadsheet Exporting."

Oya Kaynar commented on Dec 6, 2023

Resolved

We used the map function to manipulate Excel columns. We replaced decimal values with commas. 23.200 => 23,200

")->pipe(new Map([
    "{value}" => function($row) {
        $row["column1"] = (float) number_format((float) $row["column1"], 2, '.', '');
        if($row["column1"]  == "0") {
            $row["column1"] = "0,00";
        }
        $row["column2"] = (float) $row["column2"];
        return $row;
    }
]))

KoolReport commented on Dec 6, 2023

Awesome!

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
solved

Excel