I am trying to export the result of my SQL query to a .csv file using column formatting as below.
SET head OFF
SET feedback OFF
SET pagesize 500
SET linesize 2000;
SET colsep ,
set trimspool on
set trimout on
set trims on
column c1 heading POSTING_DATE Format date
column c2 heading COMPANY_CODE Format a6
column c3 heading PHYSICAL_ACCOUNT Format a8
column c4 heading DEBIT_AMOUNT Format 99999.99
column c5 heading CREDIT_AMOUNT Format 99999.99
select POSTING_DATE c1,
COMPANY_CODE c2,
PHYSICAL_ACCOUNT c3,
DEBIT_AMOUNT c4,
EDIT_AMOUNT c5
from abc_temp;
The report is getting generated perfectly in .csv format but I am facing an issue with two columns: credit_amount and debit_amount.
When I open the .csv file in Excel and select few cells it should display the sum, count and average of all the selected cells as per the in-built Excel feature. That is not working for these two columns; only the count is displayed

It seems like Excel is treating these as strings instead of numbers. How can I fix this behaviour?