HOw to convert text to table

I have a very large list of items in a .txt file.  I want to either:

1.  Copy and then paste them into the body of a Lotus Notes email AS A TABLE, with each item in a separate cell (e.g. if there are 100 items in the list, I want to end up with 100 rows in the table) without having to deal with each list item separately.

OR

2.  Copy and then paste them into the body of a Lotus Notes email as a list of text and then convert the list to a table so I can add a column to the right.

I cannot find any menu option to convert text to a table.

I know I can create a table, and then select a cell and paste the entire list into a single cell, but I want to end up with one row for each item pasted.
LVL 1
wsturdevAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SysExpertCommented:
You will need to write a script to do this, since I do not see any way to do this manually within Notes.

Another option that may work for you is to first put the text into a Spreadsheet ( Excel or Open Office ) and then copy and paste to Notes.


I hope this helps !
0
qwaleteeCommented:
If you want to do text processing, you can convert it into an HTML table that Notes can import. Otherwise, use Word or Excel as intermediaries, which can also be imported into Notes. The advantage of HTML is that you odn't need an external program, since you can put out the HTML codes as text, e.g., the ocde snippet below creates such a file out of a two-dimension array.

So your code could load the data into an array such as the one in the snippet, use a routine such as the one in the snippet to create an HTML file containing your table and data, and then import it into Notes. To do that import, you'll need to use NotesuiWorkspace.CurretnDocument. :

.GotoField to place cursor in a rich text field
.Import("HTML File",tempFilename)


Dim cells(4,5)
'load cells somehow, not showing this here
Const tempFileName = "C:\TEMP.HTML"
 
Open temmpFileName For Output As #1
Print #1, "<HTML><HEAD><TITLE>Tempory file for importing table<BODY><TABLE>"
 
Dim i As Integer, j As Integer
For i = 0 to Ubound(cells)
  Print #1, "<TR>" 'start new row
  For j = 0 To Ubound(cells,2)
    Print #1, "<TD>" cells(i,j) 'start HTML table cell and dump its data
  Next j
Next i
 
Print #1, "</TABLE></BODY></HTML>"
Close #1

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.