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


OK, this comes from the Nabble interface and from your example data I come to
the conclusion that all data are integers.
A generic solution for up to 1024 columns may look like this:

Assumed data in Data.A1:AMJ999
A1000: =MAX(LEN(A$1:$A$999)) [this is an array formula to be entered with
Ctrl+Shift+Enter rather than Enter]
Copy&paste A1000 to B1000:AMJ1000 (drag&drop won't do what I want in this
case).
Now we have an additional row with the maximum lenghts of each data column
in A1:AMJ999.

Other_Sheet.A1: =IF(LEN($Data.A1)<$Data.A$1000;REPT("
";$Data.A$1000-LEN($Data.A1));"")&$Data.A1
Copy Other_Sheet.A1 to Other_Sheet.A1:AMJ999
For formatted numbers (dates, times, percent etc)  replace $Data.A1 with
TEXT($Data.A1;"format_string") in the respective column.

Now all the cells are left padded with spaces having the same lenght as the
calculated maximum lenght.

Save that sheet as delimited text but with no column delimiter nor text
delimiter. Clear the respective export options.


--
View this message in context: 
http://nabble.documentfoundation.org/Problem-when-exporting-exporting-from-CALC-to-a-fixed-length-csv-tp3986825p3987174.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.