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




On 2012-05-31 07:15, berritorre wrote:
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.

Hi.
What systems are you running. I seem to be (or was) doing exactly what you want from our accounting system. The accounting system outputs delimited file with ; and I use a perl script to pad the data to fixed length. All automated by a cron job.
steve

--
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.