The Aspose series of controls have good functions and have been using Aspose in my Winform development framework. cell is used for report output, which can implement a variety of report design and output. Generally, the output content is more formal or most of them are tables, so Aspose is generally used. cell to implement the various Excel report outputs I want. Although I have always known that Aspose. Word is used to generate Word Documents, and I believe it is also a very powerful control, it has never been used, so I am not very familiar with it.
By chance, the report function of a project was designated to be exported as a Word document. Therefore, I searched for many articles. However, most of the articles were simple, so I also referred to the official help introduction, finally met the customer's needs. Next, let me introduce how to use this control in actual business.
1. Word operations for two-dimensional tables
In daily work, the common content output is a two-dimensional table. The header is relatively fixed, and each row of content contains one line. How can we operate on the actual use of controls, in fact, there are many articles about this control. You can refer to it for reference. In fact, this article describes the importance of bookmarks. This is also true for the Aspose. Cell Control. Bookmarks can be used to replace content and mark the start position of content input.
First, we will draw a table header in a blank Word document, and then insert a tag reference when we start to wrap the line. There are two ways to insert bookmarks, one is in Word (2007, 2010) click Insert in the left-side navigation pane.
One is to add other commands on the custom quick access Toolbar of Word, as shown in the following steps:
The bookmarks inserted by the former do not contain text or special marks, but do exist. The latter inserts a gray block as a placeholder, as shown below, in my example of this two-dimensional table, use the latter for testing (the two are equally effective)
For details about Aspose. Words, click here
Aspose. Words: click here
Reading: Using Aspose. Words to extract table data from Word documents
For more details, please continue to read the highlights on the next page: