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

Feel like idiot

e-mail strips end spaces.

Generate the same data in calc, save it as a cvs with fixed format. I'm pretty sure when you open it with either Notepad or Writer (don't forget to change it to a .txt document for writer) you'll get same results.

On 5/30/2012 8:01 PM, Paul D. Mirowsky wrote:
The following is the output of a Calc test document.
Clicked on upper left block to select entire sheet.
Right click on top of column and selected <Format cells>
Font tab - font to fixed length font, Letter Gothic.
Border tab - spacing to font set at zero (0)
Clicked on upper left block to select entire sheet.
Menu: <Format><Column><optimal width>Add 0"
The results copied here show that there is definitely 2 spaces being added after each column. Although you can't see it, go to the end of the last column and you can backspace twice.
It is not accurate to say that Calc uses the width of the column.

test_column-A1   test_column-B25  Test_column-C50  Test_column-D75
test_column-A2   test_column-B26  Test_column-C51  Test_column-D76
test_column-A3   test_column-B27  Test_column-C52  Test_column-D77
test_column-A4   test_column-B28  Test_column-C53  Test_column-D78
test_column-A5   test_column-B29  Test_column-C54  Test_column-D79
test_column-A6   test_column-B30  Test_column-C55  Test_column-D80
test_column-A7   test_column-B31  Test_column-C56  Test_column-D81
test_column-A8   test_column-B32  Test_column-C57  Test_column-D82
test_column-A9   test_column-B33  Test_column-C58  Test_column-D83
test_column-A10  test_column-B34  Test_column-C59  Test_column-D84
test_column-A11  test_column-B35  Test_column-C60  Test_column-D85
test_column-A12  test_column-B36  Test_column-C61  Test_column-D86
test_column-A13  test_column-B37  Test_column-C62  Test_column-D87
test_column-A14  test_column-B38  Test_column-C63  Test_column-D88
test_column-A15  test_column-B39  Test_column-C64  Test_column-D89
test_column-A16  test_column-B40  Test_column-C65  Test_column-D90
test_column-A17  test_column-B41  Test_column-C66  Test_column-D91
test_column-A18  test_column-B42  Test_column-C67  Test_column-D92
test_column-A19  test_column-B43  Test_column-C68  Test_column-D93
test_column-A20  test_column-B44  Test_column-C69  Test_column-D94
test_column-A21  test_column-B45  Test_column-C70  Test_column-D95
test_column-A22  test_column-B46  Test_column-C71  Test_column-D96
test_column-A23  test_column-B47  Test_column-C72  Test_column-D97
test_column-A24  test_column-B48  Test_column-C73  Test_column-D98
test_column-A25  test_column-B49  Test_column-C74  Test_column-D99

On 5/30/2012 2:21 PM, berritorre wrote:
I need to generate a fixed-length ascii/text file from a table that I have. Fixed length ascii seems to be the format to import in a software my client

So I was fiddeling around and hat a lot of problems. Excel would export to .prn just as I need it, but only for for 255 characters per line. I have a few thousand columns in my spreadsheet with quite a few columns with more
than one character.

In LobreOffice I found the option to export to csv with fixed length and
actually this would be what I am looking for. However, Libreoffice seems to add a space to separate columns, which just doesn't fit with fixed-length ascii, as they shouldn't have separators/delimiters. I can't just replace the spaces with "nothing", as there need to be spaces in the file to fill up the columns when in a column there can be for example up to 5 characters,
but sometimes there are less.

So here would be a csv file with delimiter:

As a fixed length ascii file it should look like this:

But unfortunately, LibreOffice inserts some a space in front of each column.

I hope this will show up correctly now.

View this message in context:
Sent from the Users mailing list archive at

For unsubscribe instructions e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


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.