How to rotate the text file?

  • Thread starter Thread starter Yogev
  • Start date Start date
Y

Yogev

Hi, I got a text file/table: 200 lines on 900 rows.
How to rotate it ,900 lines on 200 rows and to print it (on number of pages).
Any utility or smart editor.

Yogev
 
Do you have a spreadsheet program? If so then you can perhaps copy & paste
your table into that, then copy/paste to a new location using (example from
Microsoft Excel) "Edit / Paste Special / Transpose". Then copy/paste back
into your text file.

Hope this works.
 
Yogev wrote:
|| Hi, I got a text file/table: 200 lines on 900 rows.
|| How to rotate it ,900 lines on 200 rows and to print it (on number
|| of pages). Any utility or smart editor.
||
|| Yogev

Are you, by any chance, trying to print it in landscape? Wouldn't that
do it for you?
 
(e-mail address removed) (Yogev ) wrote in
Hi, I got a text file/table: 200 lines on 900 rows.
How to rotate it ,900 lines on 200 rows and to print it (on number of
pages). Any utility or smart editor.

If you can use gawk, there is a good (bad style) start here :

rot.awk yourfile

____SOF_rot.awk
#!/bin/gawk -f
{nf=NF;for ( i=1; i<=NF; i++ ) a[NR, i] = $i}
END{for(i=1;i<=nf;i++)
{for(j=1;j<=NR;j++)printf("%s ", a[j,i]);printf("\n")}
}
____EOF_rot.awk


Like for instance :

rot.awk /tmp/yourfile
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

When yourfile is
# cat /tmp/yourfile
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
 
Do you have a spreadsheet program? If so then you can perhaps copy & paste
your table into that, then copy/paste to a new location using (example from
Microsoft Excel) "Edit / Paste Special / Transpose". Then copy/paste back
into your text file.

OpenOffice's spreadsheet also has a transpose function to do that, but
it's a rather large download. Does anyone here use a small freeware
spreadsheet that can import text files and transpose (rotate) a block of
cells?
 
Mark said:
OpenOffice's spreadsheet also has a transpose function to do that, but
it's a rather large download. Does anyone here use a small freeware
spreadsheet that can import text files and transpose (rotate) a block of
cells?

A good stand-alone, full-functioned, multi-page spreadsheet freeware
would sure be nice . . .

SPHYGMIC SPREADSHEET is one page, does formulas but doesn't seem to be
able to transpose. :(

602Pro PC SUITE has what appears to be a fairly full-featured, multipage
spreadsheet - that package is much smaller (16.3 MB) than the
OpenOffice.org package. OTOH I downloaded it a couple of days ago
(haven't installed yet) and it took foreverrrrrrrrrrrr - very slow
connection.

http://www.software602.com/download/

http://download3.software602.com/pcs2001.exe


Also found and downloaded XPSheet:

http://www.web-zaehler.de/adam/sp.shtml

<quote>
Ever wanted a powerful and flexible grid to show your data in a god
looking and usable way ? Well, here's your solution with XPSheet. If has
many features of Excel(R) just like formulas, cell-refreshes,
cell-searching for formulars and more. As you can edit every cell and
give it several formats like font-formatting, borders and
cell-information, you can use this grid as a powerful sheet and also as
a much better TStringGrid!

Another, user-friendly feature is the saving in XML. The grid saves and
loads W3C-conform XML-Code, so you can even edit your data as textfile
and reload it !

The grid has a formula-parser integrated that can execute functions and
recognize your cells with chars, so a valid function above would be

=B5 * Pi

The grid includes a runtime-design editor for Delphi. New features are
now cell-mergin (connect two or more cells), cell-masking,
cell-bordering. New: Following inplace-editors are now integrated: text,
select, color, html, hyperlink, button. Downloading

The SpreadSheet Component is Freeware. I give it out to the community to
give it something back.

The component has some bugs (mainly with merged cells), but maybe
there's someone out to fix that or to make a documentation or more.
Please mail me if you changed the components: Mail Me!
</quote>


Haven't installed that one yet either. to be continued . . .

Susan
 
Back
Top