Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


I work with csv/txt in Writer as a filter function.

I substitute commas for spaces, insert commas for field separation and add missing column information. It is very fast and have set up recording macros to do it based on the original files Calc import problems. Not pleasant, but works well once understood and set.

It may be best to separate the EUR to a different field/column. Then use some form of "if" statement in Calc to format your numbers in column A based on column B. (This part has not been tested by me.)

It may not be very elegant, but because your data set is consistent, may temporarily answer your problem.


On 12/3/2011 3:05 PM, berntie wrote:
Hi, I'm having an issue with cell formatting in CSV files. Consider the
following simple CSV file (should be self explanatory):

Date;Item;Amount
01.12.2011;New laptop;-1.000,00
02.12.2011;Glass of beer;-3,00

(I'm using a German locale, so the comma is the decimal spearator.) If you
import that into Calc and format the date column with a rule like "NNNNTT.
MMMM JJJJ" and the amount column as a currency with a rule like "#.##0,00
[$EUR];[ROT]-#.##0,00 [$EUR]", then everything works fine (negative amounts
are red etc.) Save the CSV file and you end up with

"Date";"Item";"Amount"
Donnerstag, 01. Dezember 2011;"New laptop";-1.000,00 EUR
Freitag, 02. Dezember 2011;"Glass of beer";-3,00 EUR

in the file. Now open that file again with Calc and try to format the amount
column with the same rule: fail. New entries are formatted correctly, but
not existing entries. It works for the date column if you select date as the
column type in the import dialog, but you cannot choose currency as column
type.

I'm tempted to think that this is either a missing feature (no column type
"currency" in the import dialog) or incorrect saving/exporting behavior by
Calc (the cell format should only affect how the values are displayed, not
how they are stored in the file). So, what should I do:

* File a bug/feature request? If yes, where can I do that?
* Work around the issue? What would that workaround be??
* Or am I using Calc the wrong way?

Any suggestions appreciated...

Thanks, Bernhard

--
View this message in context: 
http://nabble.documentfoundation.org/Cell-formatting-with-CSV-files-in-Calc-tp3557689p3557689.html
Sent from the Users mailing list archive at Nabble.com.


--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


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.