Free Support Forum - aspose.com

How do I get large text go into different cells?

I am pulling a Text field from a database. It is delimited with Chr(13) or carriage returns as line breaks. When I try to put that text into a Cell I expect the carriage returns to tell Apose to put each line in a separate cell. However, I end up with all the text in one Cell in s stright line.

I tried replacing the Chr(13) with Chr(10) Line Feed. But that puts all the text into one cell, but now the text lines are stacked vertically. That is still not what I need to keep the worksheet in balance.

What delimiter (or command parameter or style) do I use to get each line of the text into a separate cell.

What I want to happen is just like if I put a DataTable into a cell, the first field goes into the cell I specify and the rest go into the cells below.

Thank You...

P.S. I guess that Amjad must be off shift now. He was answering my question about "File Error: Some of the data may be lost". But he is not answering anymore. I need to get this job completed by Monday morning, so thanks for ANY help.

OK, I was able to get this one on my own finally. I had to declare a VB array of type String and load it by using the Split function as in:

array = split(description_text, Chr(13))

Then ...Cells.ImportArray(array, 15, 3, True)

---------------------------------

However,

I still need some help with the "File Error:Data may be lost" when I construct a workbook from 2 different Excel templates.

Please see my previous post about this and the continuing thread.

Thank you...you guys are very helpful.