?
Solved

HOw to convert text to table

Posted on 2008-02-08
2
Medium Priority
?
539 Views
Last Modified: 2013-12-18
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.
0
Comment
Question by:wsturdev
2 Comments
 
LVL 63

Expert Comment

by:SysExpert
ID: 20850407
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
 
LVL 31

Accepted Solution

by:
qwaletee earned 2000 total points
ID: 20851495
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

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month5 days, 5 hours left to enroll

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question