Aspose Word template usage Summary

Source: Internet
Author: User

1. Create a word template,Use MergeFeildBind dataString [] fieldNames = new String [] {"UserName", "Gender", "BirthDay", "Address "}; object [] fieldValues = new Object [] {"Zhang San", "male", "1988-09-02", "Xianyang, Shaanxi "};Create a template for cyclic data. Here, the cyclic data is similar to the for structure of the page and is not stuck in the form table.

«TableStart: UserList»

«UserName»

4. Use DataTable to provide data sources

Var datatable = GetDataTable (); 5. Bind a data template with a subloop 6. Use DataSet to provide data sourcesDataSet dataSet = new DataSet (); var userTable = GetUserDataTable (); var userScoreTable = GetUserScoreDataTable (); dataSet. tables. add (userTable); dataSet. tables. add (userScoreTable); dataSet. relations. add (new DataRelation ("ScoreListForUser", userTable. columns ["Id"], userScoreTable. columns ["UserId"]); 7. Use bookmarks on the template to insert the tag location 8. Insert the content of another document in the bookmarks

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.