At 13:53 17/03/2014 +0000, Budgie Noname wrote:
On 17/03/14 13:25, Brian Barker wrote:
At 11:43 17/03/2014 +0000, Budgie Noname wrote:
In short I am having to "massage" a .csv file exported from one
system before importing it into an accounting system. The
accountant wants a "Comment" column added before importing the
file which summarises information held in four other columns. Two
columns contain names and do not present a problem but the other
two have dates. In the .csv file the dates are shown 02-Oct-14
and I am having trouble getting these dates treated as text.
To get the names I have:-
=B2&" "&C2 but how do I copy the dates?
If you have real dates in the columns and you need to include them
as text in the additional column, just use TEXT(D2;"DD-MMM-YY")
where you would otherwise use D2 in your formula, and so on.
But if you mean that your original CSV file has these dates in this
format, there is an easier way. When you open the CSV file, you
should see the Text Import dialogue. Under Fields, click in the
date columns and then select Text from the drop-down menu against
"Column type". The dates will be imported as text and you will not
need the above workaround.
Got it and it is working.
I do still have some issues. If I work on the .csv file in Calc and
add columns etc, save as a .csv and re open in Calc the columns are
changed in that I get contents of some cells are split into two
columns. I shall do some reading but guess this might be because
column content is not a single entry but sometimes several in one
cell, separated by space or comma. Am I correct?
As its name suggests, the default separator in a CSV file is indeed a
comma, so commas in cell text could potentially be a problem. But
experiment suggests to me that Calc will automatically enclose any
text containing a comma in double quotes, in order to escape the
problem. So I'm not sure what you are seeing.
When you first save as .csv you will see the "Export of text files"
dialogue, in which you can choose both the field delimiter - normally
a comma - and the text delimiter - normally double quotes. Does
modifying either of these affect your problem? If you are working
with your CSV file and need to get back to these settings, use Save
As... (which lets you save back to the same CSV file) but tick the
"Edit filter settings" box in the Save As dialogue.
I trust this helps.
To unsubscribe e-mail to: email@example.com
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
Impressum (Legal Info)
: 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