The implementation code is as follows:
1 /// <summary>
2 // set the Word template. The word table style is set here.
3 /// </summary>
4 /// <param name = "dsTr"> </param>
5 /// <returns> </returns>
6 protected string SetWordTemplate (string dsTr)
7 {
8 StringBuilder html = new StringBuilder ();
9
10 html. Append ("<! DOCTYPE html PUBLIC-// W3C // dtd xhtml 1.0 Transitional // EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> ");
11 html. Append ("12 html. Append ("13 html. Append ("<body> ");
14 // html. Append ("<table cellpadding = 0 cellspacing = 0 border = 1> ");
15 html. Append (dsTr );
16 // html. Append ("</table> ");
17 html. Append ("</body> ");
18 html. Append ("19
20 return html. ToString ();
21}
22
23 /// <summary>
24 // Save the Word
25 /// </summary>
26 /// <param name = "savePath"> </param>
27 /// <param name = "data"> </param>
28