El 30/05/12 21:15, berritorre escribió:
Thanks for your response.
I have tried CSVed before. Actually, I don't really want to work with the
csv files. Actually doesn't even need to be a csv file. Any ASCII text file
probably does.
It just has to have the correct format. So my client sends me a data map
where he specifies the exact width for each column. E.g.
Variable 1: Positions 1-4
Variable 2: Positions 5-6
Variable 3: Positions 7-10
My software generates csv files with ";" as delimiter which works perfect
for importing in Calc or Excel. But then I have to follow my clients
requests and the document has to have exactly the required format. So what I
do is I add a row at the top with the max. number of characters for this
specific variable, e.g. if it would be variable 1 from the example above,
the first line would look like this: "1234". This is how I guarantee the
length.
I found a software that is generating .sdf files from csv files (called
Convert). But actually I would like to do it directly from a spreadsheet
software, to avoid another software. Libreoffice almost does it right. It
just takes the visible width of the column as the width to export and not
the max. characters in a column.
When I adapt the column width manually to the minium which still allows to
see all characters Libreoffice exports correctly!!
So I would just need to find a way to avoid this little visible space on the
left of the cell. Excel adapts the columns correctly and doesn't add space
to the left, but minimizes the column to exactly the width necessary to show
all characters, but then Excel doesn't allow to export fixed field csv
files.
--
View this message in context:
http://nabble.documentfoundation.org/Problem-when-exporting-exporting-from-CALC-to-a-fixed-length-csv-tp3986825p3986844.html
Sent from the Users mailing list archive at Nabble.com.
When saving as CSV there is an option to edit filter settings, one is
fixed column with. (Click the option and follow saving).
In the help.
"
Fixed column width:
Exports all data fields with a fixed width.
The width of a data field in the exported text file is set to the
current width of the corresponding column.
Values are exported in the format as currently seen in the cell.
If a value is longer than the fixed column width, it will be exported as
a ### string.
If a text string is longer than the fixed column width, it will be
truncated at the end.
The alignment Left, Centered, and Right will be simulated by inserted
blanks.
"
Miguel Ángel.
--
For unsubscribe instructions e-mail to: users+h...@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