About EasyMorph Tutorials & Examples Web-help

How to suppress double quotes in the export to CSV file?


#1

Hi,

I have managed to successfully export my table into CSV file. Unfortunately, there is one thing I cannot solve.

When one exports column defined as a character one and there is a number in it then it always puts double quotes around the number.

Any idea how to suppress these double quotes? I don’t want to have the double quotes in the final CSV file.

To give you even more context. The file is not used within the Excel. It is exported to CSV and then used by another ETL tool to be loaded into the final database. It may look messy but it is due to accesses and the fact that our DWH is in a different country.

Thanks,
Milan


#2

Hi Milan,

Columns in EasyMorph don’t have a fixed type (only cells have).

Most likely numbers which are being quoted are store in EasyMorph as Text
(you can check cell type by right-clicking on a cell and choosing Metadata menu item).
Such numbers are always quoted.

The workaround here is to convert those numbers from Text cell type to Number.
You can do it with Modify column transformation and following expressions:

In case column contains only numeric values:

asnumber([Column])

In case column contains both non-numeric and numeric values:

if(not iserror(asnumber([Column])), asnumber([Column]), [Column])