Skip to main content
Modified the `NumberFormat` function per questioner request. Also added an example dataset to visualise the result more easily.
Source Link

This should do the trick (for example, if you would like to use a semicolon as a field separator):

dataset = Table[i^2 - 10.*j, {i, 10}, {j, 10}];
Export["dataset.csv", ToString[ScientificForm[datasetdataset/.x_?NumberQ:>ToString[ScientificForm[x, 10, NumberFormat -> (Row[{#1, "E"If[#3 == "", #3, "E"], #3}] &)]], "Table", "FieldSeparators" -> ";"]

Depending on the structure of your dataset, you might need to apply ScientificForm to its members separately (or only some of them, or only numeric ones).

The advantage of "Table" over "CSV" is that the separator is not fixed to comma, but can be changed. See also the documentation:

http://reference.wolfram.com/language/ref/NumberFormat.html

http://reference.wolfram.com/language/ref/format/Table.html

This should do the trick (for example, if you would like to use a semicolon as a field separator):

Export["dataset.csv", ToString[ScientificForm[dataset, 10, NumberFormat -> (Row[{#1, "E", #3}] &)]], "Table", "FieldSeparators" -> ";"]

Depending on the structure of your dataset, you might need to apply ScientificForm to its members separately (or only some of them, or only numeric ones).

The advantage of "Table" over "CSV" is that the separator is not fixed to comma, but can be changed. See also the documentation:

http://reference.wolfram.com/language/ref/NumberFormat.html

http://reference.wolfram.com/language/ref/format/Table.html

This should do the trick (for example, if you would like to use a semicolon as a field separator):

dataset = Table[i^2 - 10.*j, {i, 10}, {j, 10}];
Export["dataset.csv", dataset/.x_?NumberQ:>ToString[ScientificForm[x, 10, NumberFormat -> (Row[{#1, If[#3 == "", #3, "E"], #3}] &)]], "Table", "FieldSeparators" -> ";"]

Depending on the structure of your dataset, you might need to apply ScientificForm to its members separately (or only some of them, or only numeric ones).

The advantage of "Table" over "CSV" is that the separator is not fixed to comma, but can be changed. See also the documentation:

http://reference.wolfram.com/language/ref/NumberFormat.html

http://reference.wolfram.com/language/ref/format/Table.html

Added `ToString` so that the exported data actually has the desired format
Source Link

This should do the trick (for example, if you would like to use a semicolon as a field separator):

Export["dataset.csv", ScientificForm[datasetToString[ScientificForm[dataset, 10, NumberFormat -> (Row[{#1, "E", #3}] &)]]], "Table", "FieldSeparators" -> ";"]

Depending on the structure of your dataset, you might need to apply ScientificForm to its members separately (or only some of them, or only numeric ones).

The advantage of "Table" over "CSV" is that the separator is not fixed to comma, but can be changed. See also the documentation:

http://reference.wolfram.com/language/ref/NumberFormat.html

http://reference.wolfram.com/language/ref/format/Table.html

This should do the trick (for example, if you would like to use a semicolon as a field separator):

Export["dataset.csv", ScientificForm[dataset, 10, NumberFormat -> (Row[{#1, "E", #3}] &)], "Table", "FieldSeparators" -> ";"]

Depending on the structure of your dataset, you might need to apply ScientificForm to its members separately (or only some of them, or only numeric ones).

The advantage of "Table" over "CSV" is that the separator is not fixed to comma, but can be changed. See also the documentation:

http://reference.wolfram.com/language/ref/NumberFormat.html

http://reference.wolfram.com/language/ref/format/Table.html

This should do the trick (for example, if you would like to use a semicolon as a field separator):

Export["dataset.csv", ToString[ScientificForm[dataset, 10, NumberFormat -> (Row[{#1, "E", #3}] &)]], "Table", "FieldSeparators" -> ";"]

Depending on the structure of your dataset, you might need to apply ScientificForm to its members separately (or only some of them, or only numeric ones).

The advantage of "Table" over "CSV" is that the separator is not fixed to comma, but can be changed. See also the documentation:

http://reference.wolfram.com/language/ref/NumberFormat.html

http://reference.wolfram.com/language/ref/format/Table.html

Source Link
Xenos
  • 156
  • 1

This should do the trick (for example, if you would like to use a semicolon as a field separator):

Export["dataset.csv", ScientificForm[dataset, 10, NumberFormat -> (Row[{#1, "E", #3}] &)], "Table", "FieldSeparators" -> ";"]

Depending on the structure of your dataset, you might need to apply ScientificForm to its members separately (or only some of them, or only numeric ones).

The advantage of "Table" over "CSV" is that the separator is not fixed to comma, but can be changed. See also the documentation:

http://reference.wolfram.com/language/ref/NumberFormat.html

http://reference.wolfram.com/language/ref/format/Table.html