Skip to main content
Question

Changing column type in excel

  • March 23, 2026
  • 3 replies
  • 48 views

Forum|alt.badge.img+10
  • Sidekick (Customer)

Hello, 

 

I created CF which add cost in new view, for example 11,11, or 28,1; but in excel this is visible as a TEXT, and I want NUMBER.

 

It is possible to change this during creation SQL command, or only locally in excel after creating some excel report?

 

Thank you

3 replies

  • March 23, 2026

Hi,

I think it must be related to the formatting. how you represent the decimal. 

Best regards,

BUJA


Forum|alt.badge.img+10
  • Author
  • Sidekick (Customer)
  • March 24, 2026

This is my SQL Oracle command: 

 

SELECT TRIM(TO_CHAR(ROUND(c.invoiced_qty * ROUND(c.cf$_c_costs,2),2), '99990D99',
         'NLS_NUMERIC_CHARACTERS = '',.''')
       ) AS total_costs
FROM table_1 c
WHERE c.order_no = :order_no, I add there TO_CHAR because I want to display in excel decimal values with comma


Udara Hasantha
Do Gooder (Customer)
Forum|alt.badge.img+4
  • Do Gooder (Customer)
  • March 25, 2026

Hi, 

No, you cannot make the column return a real NUMBER type in Excel if you use TO_CHAR in the SQL. TO_CHAR always converts the value to text (string), so Excel will treat it as text — even if it looks like a number.

use 
ROUND(c.invoiced_qty * ROUND(c.cf$_c_costs, 2), 2) AS total_costs
This returns a true NUMBER type.

  • In Excel, the value will be a real number (you can sum it, format it, etc.).
  • For the comma as decimal separator in Excel:
    • Keep your Windows / Excel regional settings with comma as decimal (common in Europe/Canada).
    • Or, in the Excel report, just format the column as Number with 2 decimal places and choose "Use system separators" or set comma as decimal.