Hello,
I first give an example of a CSV file that I want to import into Libreoffice
Calc:
"t","Dpsi","Dtheta","Dphi"
0.00000e+00,1.28000e+00,-8.00000e+00,1.30000e+02
1.00000e-03,-1.10555e+02,-7.97843e+00,2.41833e+02
2.00000e-03,-1.00443e+03,7.70485e+00,1.13570e+03
3.00000e-03,-2.12390e+01,8.00497e+00,1.52518e+02
The first row contains text labels and the subsequent rows contain
numeric data in scientific (floating point) format.
When I attempt to open this file in LO it first presents a screen
to select options. If I then select the option "Detect Scientific Notation"
the result in LO becomes this:
t Dpsi Dtheta Dphi
0 1.28 -8 130
0.001 -110.555 -7.97843 241.833
0.002 -1004.43 7.70485 1135.7
0.003 -21.239 8.00497 152.518
Everything is formatted correctly, that is the text labels are text and the
numbers are numbers, but the floating point (FP) format has been converted
to a decimal format.
My desire is to keep the original FP format.
If I attempt to load the CSV file again but without selecting the
option "Detect Scientific Notation" the result becomes this:
t Dpsi Dtheta Dphi
0.00000e+00 1.28000e+00 -8.00000e+00 1.30000e+02
1.00000e-03 -1.10555e+02 -7.97843e+00 2.41833e+02
2.00000e-03 -1.00443e+03 7.70485e+00 1.13570e+03
3.00000e-03 -2.12390e+01 8.00497e+00 1.52518e+02
It seems that the FP format is retained but this is not the case.
Everything, including the numeric data, is now formatted as text.
I suspect that because the FP format contains "e+/-" characters the
import filter converts everything into text.
How can I retain the original FP format as numeric and not text?
I don't think that this is possible.
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Context
- [libreoffice-users] CSV Import Loses Scientific Format · LAP
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.