Free Support Forum - aspose.com

Inserting Rows into Tables and Replacing Bookmarks

Hi there,

I have been waiting for a component like this, but I need the following functionality:

Ability to insert rows into a Word table from a DataSet.
Ability to replace Word bookmarks with data (similar to MailMerge I guess).

The tables is the most critical element since our output document is kind of complex.

Is there anything like this on the horizon?

Hi,

We plan to include ability to insert rows into a Word table from a DataSet.
This feature is due out in Aspose.Word 1.1 (planned release date 20th January).

This feature works using “repeatable sections”. The name “repeatable sections” is not finalized yet, maybe it will be called differently in the release.

But the idea is you put some special markings (fields or maybe bookmarks) into the document the denote beginning and end of the section and give this section a name.

In your case you will put beginning of the repeatable section mark before the table row you want to duplicate and end of repeatable section at the end of the row. You put mail merge fields into the table cells.

Then you instruct Aspose.Word to perform mail merge and it will create rows in the Word table for each record in the dataset.

We are still working on the details of the API so if you have any suggestions how you’d like the API to look like and how you prefer to mark repeatable sections inside a Word document, please put them forward.

Also, we have not yet finally settled on how best to handle one-to-many relationships.
Traditionally Word does not have a streamlined way of doing mail merge for this scenario but we are looking for ways to break this limitation. For example, there is a need to be able to create an invoice which has order header, then order details and totals at the bottom.

Technically it is already working, but I’m not sure what’s the best way to expose it in API yet.

Hi,

This is to answer the other part of the question about replacing bookmarks.

One of the goals for Aspose.Word is to expose all content of the Word document in an object model that you can manipulate to add/modify/delete content of the document.

Exposing full model is a difficult task and will evolve through several Aspose.Word versions.

But as soon as particular features are requested, we can bring them forward and do earllier. For example, we’ve exposed ability to delete sections from a Word document in Aspose.Word 1.1 as per customer request.

It is too late to add ability to replace content of bookmarks to 1.1, but we can probably fit it into 1.2 which will be out in another 1-1.5 months.

Hi,

It is possible to fill rows in a table in a document from a DataTable. Check out latest Aspose.Word 1.1 http://www.aspose.com/forums/ShowPost.aspx?PostID=3710.

Hi there. I purchased 1.1, but I desperately need the ability to dynamically grow tables as I add data. There is no way I can predict the size of the data/tables.

I know this is a lot to ask, but is there anyway I can get this functionality? I would be willing to pay for it. That is how bad I need it.

Hi hehdaddy,

We are working on this feature right now. It will be released in v1.2 end of Februrary. In beta versions it might be available earlier. It is going to be a very good feature.

I would love to get a beta copy as soon as you have the functionality working. Thanks so much for the update!!

Roman,

I'm clearly missing something. The insert tablerow feature was promised for version 1.2 released in feb 2004. Today (April 2005) still not there. What's up ?

Regards

Jan

This talk was about mail merge regions, not about document builder insert table row.

You can define a mail merge region in a document (it can be one row of a table) and the result will be a table in the document populated with your data, see the demo project for examples on this.