Hi.Read this:
http://www.codeproject.com/Articles/...-getElementByI

Also if you don't have a specification on having everything in one row you could css your columns with a specified width so they will go on the next line when end of cell is reached or you can specify them to cut the word if they reach the end of the cell.