Free Support Forum - aspose.com

Creating tables in realtime

Hi, I’m still at it…
I’ve managed to generate my first simple documents, and even though i’ve had to do some workarounds, to do what I need to do, all in all i’m very pleased with the component.

I’ve seen how you mailmerge to generate tables in the invoice example, but even though i’m reading from a DB, my data structures are more tree like than simple tables, so i’m having to do all the work.

I can create tables directly, and fill tables that I have designed, however I would like to be able to mix and match both ways of working with tables.

When I use movetocell, and then try an endrow, I get an error. Method not valid.
But if I use insertcell, then things get slightly out of hand and I mess up my origional table.

Is it possible to use mix these two different ways of working with tables?

Finally, I have seen that you are planing a HTML conversion routine to import and export documents, would it be possible to also have a WriteHTML method added to documentbuilder, that would allow us to ‘paste’ simple html code bold, underline, and maybe even lists directly.

Thanks again for you help.

InsertCell and EndRow and a few other methods they are for table building, but MoveToCell was added later as a way to insert text into existing tables.

If you want to add rows at the end of a table (MS Word will consider it like addition to the table) try to navigate to the paragraph just after the table and user InsertCell etc there. The easiest is to mark that paragraph with a bookmark and use MoveToBookmark.

First thing that will be available is HTML export. HTML import of the whole file will follow and ultimately yes, we plan to add ability to insert just fragments of HTML and RTF.

Thanks