At 19:32 19/06/2007 +0000, Tony Chamberlain wrote:
I am using a spreadsheet (whatever the OO name for excel is) with
headings like this:
NAME PID %CPU VSZ
each in its own column. I have an appropriate ps command to give the
above output for a bunch of processes. Trouble is, when I copy and
paste into the spreadsheet it puts it all in one column (everything
under NAME) instead of distributing it to the 4 columns (name under
NAME, pid under PID, etc). Anybody know how to copy/paste to get the
data into separate columns instead of 1?
How many commands do you have? One? Or a few? I suggest typing them in.
Otherwise, here's a technique. Put your command - or, more sensibly,
list of commands - into a text file. Either rely on the spaces in
the commands to separate the fields, or use some other character
(e.g. a comma) to achieve the separation. From within Calc (for that
is what it is called), use Insert | Sheet From File... to import the
data. By tinkering with the "Separator options" in the Import
window, get the various fields to appear in separate columns. Copy
the data from the new sheet to your existing sheet and then delete
the new sheet that was created.
Alternatively, before you have constructed your sheet, create the
text file as above. Rename it with a .csv extension rather than
.txt. Open this file with OpenOffice (right-click and use Open With
in Windows) and Calc will allow you to get all the data in place from
the start. Either put your column headers into the text file or else
add them once you have the data in the spreadsheet.
I trust this helps.
Brian Barker
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]