I have setmy email for fixed width in hopes that this test will be clearer.
The table below is a direct copy from Calc using the commands I spoke
of. Letter Gothic typeface.
No override of default in formatting. (assuming it is defined on import)
The headers are a=column1 b=column2 c=column3 d=column4
column a = 1 character, column b = 6 characters, column c = 10
characters, column d = 15 characters.
a b12345 c123456789 d123456789d1234
1 a 1 this is
2 ab 10 this is a
3 abc 100 this is a test
4 abcd 1000 this is a testD
5 abcde 10000 this is a test
6 abcd 100000 this is a
7 abc 1000000 this is
8 ab 1000000000 this
9 a 1000000000 this
The results after export fixed width were copied from NotePad on Windows XP.
ab12345 c123456789 d123456789d1234
1a 1this is
2ab 10this is a
3abc 100this is a test
4abcd 1000this is a testD
5abcde 10000this is a test
6abcd 100000this is a
7abc 1000000this is
I shall describe the results but I am hoping you will see what I see.
Headers and data in Column a and b have no space between them.
Headers in Column b and c have one space between them.
Data in Column b and c have two spaces between them.
Headers in Column c and d have one space between them.
Data in Column c and d have no space between them. (field forced to a
numeric value and pushed right)
Data in Column d has added two spaces after field.
In any case, what it means is that Calc is unreliable as a fixed record
length definition on export.
Sorry but must advise using a different program as filter for export.
I do not know if importing data to a Base file would export in fixed
length or if it did, would be correct.
On 5/31/2012 12:09 PM, berritorre wrote:
So I did some more testing with the latest version and I still persist:
LibreOffice uses the visible width of the column to determine the fixed
Here is what I did:
- Followed your instructions on how to format the cells (had done this
- Included some text columns
- Marked everything and double clicked the column header row to adjust the
width of the columns automatically to their content.
- Made one of the columns with numbers and one of the columns with text
wider to show the effect, left the others with the automatically adjusted
So what happens is the following: LibreOffice adds 1 space to the left of
each cell containing numbers and it adds actually 3 spaces to the right of
each cell containing text!
Here a screenshot. Marked with a red circle are the "problematic" areas.
Those spaces in the cells Libreoffice seems to export as well, which would
be OK if adjusting the columns automatically would adjust correctly, but
there are always those spaces.
View this message in context:
Sent from the Users mailing list archive at Nabble.com.
For unsubscribe instructions e-mail to: firstname.lastname@example.org
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
- [libreoffice-users] Re: Problem when exporting exporting from CALC to a fixed length csv (continued)
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