Skip to content

Latest commit

 

History

History

ts-word

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Java Export to Word

Add denpendency

<dependency>
      <groupId>com.cc.pub</groupId>
      <artifactId>ts-word</artifactId>
      <version>0.0.1-SNAPSHOT</version>
</dependency>

Usage

public class WordExportTest {
    static String template = "<?xml version='1.0' encoding='UTF-8' standalone='yes'?><?mso-application progid='Word.Document'?><w:wordDocument xmlns:aml='http://schemas.microsoft.com/aml/2001/core' xmlns:wpc='http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas' xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882' xmlns:mo='http://schemas.microsoft.com/office/mac/office/2008/main' xmlns:mc='http://schemas.openxmlformats.org/markup-compatibility/2006' xmlns:mv='urn:schemas-microsoft-com:mac:vml' xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:v='urn:schemas-microsoft-com:vml' xmlns:w10='urn:schemas-microsoft-com:office:word' xmlns:w='http://schemas.microsoft.com/office/word/2003/wordml' xmlns:wx='http://schemas.microsoft.com/office/word/2003/auxHint' xmlns:wne='http://schemas.microsoft.com/office/word/2006/wordml' xmlns:wsp='http://schemas.microsoft.com/office/word/2003/wordml/sp2' xmlns:sl='http://schemas.microsoft.com/schemaLibrary/2003/core' w:macrosPresent='no' w:embeddedObjPresent='no' w:ocxPresent='no' xml:space='preserve'><w:ignoreSubtree w:val='http://schemas.microsoft.com/office/word/2003/wordml/sp2'/><o:DocumentProperties><o:Author>Microsoft Office 用户</o:Author><o:LastAuthor>Microsoft Office 用户</o:LastAuthor><o:Revision>2</o:Revision><o:TotalTime>0</o:TotalTime><o:Created>2017-12-15T07:28:00Z</o:Created><o:LastSaved>2017-12-15T07:28:00Z</o:LastSaved><o:Pages>1</o:Pages><o:Words>5</o:Words><o:Characters>34</o:Characters><o:Lines>1</o:Lines><o:Paragraphs>1</o:Paragraphs><o:CharactersWithSpaces>38</o:CharactersWithSpaces><o:Version>15</o:Version></o:DocumentProperties><w:fonts><w:defaultFonts w:ascii='Calibri' w:fareast='宋体' w:h-ansi='Calibri' w:cs='Times New Roman'/><w:font w:name='Times New Roman'><w:panose-1 w:val='02020603050405020304'/><w:charset w:val='00'/><w:family w:val='auto'/><w:pitch w:val='variable'/><w:sig w:usb-0='E0002AEF' w:usb-1='C0007841' w:usb-2='00000009' w:usb-3='00000000' w:csb-0='000001FF' w:csb-1='00000000'/></w:font><w:font w:name='宋体'><w:charset w:val='86'/><w:family w:val='auto'/><w:pitch w:val='variable'/><w:sig w:usb-0='00000003' w:usb-1='288F0000' w:usb-2='00000016' w:usb-3='00000000' w:csb-0='00040001' w:csb-1='00000000'/></w:font><w:font w:name='Cambria Math'><w:panose-1 w:val='00000000000000000000'/><w:charset w:val='01'/><w:family w:val='Roman'/><w:notTrueType/><w:pitch w:val='variable'/></w:font><w:font w:name='@宋体'><w:charset w:val='86'/><w:family w:val='auto'/><w:pitch w:val='variable'/><w:sig w:usb-0='00000003' w:usb-1='288F0000' w:usb-2='00000016' w:usb-3='00000000' w:csb-0='00040001' w:csb-1='00000000'/></w:font><w:font w:name='Calibri'><w:panose-1 w:val='020F0502020204030204'/><w:charset w:val='00'/><w:family w:val='auto'/><w:pitch w:val='variable'/><w:sig w:usb-0='E00002FF' w:usb-1='4000ACFF' w:usb-2='00000001' w:usb-3='00000000' w:csb-0='0000019F' w:csb-1='00000000'/></w:font></w:fonts><w:styles><w:versionOfBuiltInStylenames w:val='8'/><w:latentStyles w:defLockedState='off' w:latentStyleCount='380'><w:lsdException w:name='Normal'/><w:lsdException w:name='heading 1'/><w:lsdException w:name='heading 2'/><w:lsdException w:name='heading 3'/><w:lsdException w:name='heading 4'/><w:lsdException w:name='heading 5'/><w:lsdException w:name='heading 6'/><w:lsdException w:name='heading 7'/><w:lsdException w:name='heading 8'/><w:lsdException w:name='heading 9'/><w:lsdException w:name='index 1'/><w:lsdException w:name='index 2'/><w:lsdException w:name='index 3'/><w:lsdException w:name='index 4'/><w:lsdException w:name='index 5'/><w:lsdException w:name='index 6'/><w:lsdException w:name='index 7'/><w:lsdException w:name='index 8'/><w:lsdException w:name='index 9'/><w:lsdException w:name='toc 1'/><w:lsdException w:name='toc 2'/><w:lsdException w:name='toc 3'/><w:lsdException w:name='toc 4'/><w:lsdException w:name='toc 5'/><w:lsdException w:name='toc 6'/><w:lsdException w:name='toc 7'/><w:lsdException w:name='toc 8'/><w:lsdException w:name='toc 9'/><w:lsdException w:name='Normal Indent'/><w:lsdException w:name='footnote text'/><w:lsdException w:name='annotation text'/><w:lsdException w:name='header'/><w:lsdException w:name='footer'/><w:lsdException w:name='index heading'/><w:lsdException w:name='caption'/><w:lsdException w:name='table of figures'/><w:lsdException w:name='envelope address'/><w:lsdException w:name='envelope return'/><w:lsdException w:name='footnote reference'/><w:lsdException w:name='annotation reference'/><w:lsdException w:name='line number'/><w:lsdException w:name='page number'/><w:lsdException w:name='endnote reference'/><w:lsdException w:name='endnote text'/><w:lsdException w:name='table of authorities'/><w:lsdException w:name='macro'/><w:lsdException w:name='toa heading'/><w:lsdException w:name='List'/><w:lsdException w:name='List Bullet'/><w:lsdException w:name='List Number'/><w:lsdException w:name='List 2'/><w:lsdException w:name='List 3'/><w:lsdException w:name='List 4'/><w:lsdException w:name='List 5'/><w:lsdException w:name='List Bullet 2'/><w:lsdException w:name='List Bullet 3'/><w:lsdException w:name='List Bullet 4'/><w:lsdException w:name='List Bullet 5'/><w:lsdException w:name='List Number 2'/><w:lsdException w:name='List Number 3'/><w:lsdException w:name='List Number 4'/><w:lsdException w:name='List Number 5'/><w:lsdException w:name='Title'/><w:lsdException w:name='Closing'/><w:lsdException w:name='Signature'/><w:lsdException w:name='Default Paragraph Font'/><w:lsdException w:name='Body Text'/><w:lsdException w:name='Body Text Indent'/><w:lsdException w:name='List Continue'/><w:lsdException w:name='List Continue 2'/><w:lsdException w:name='List Continue 3'/><w:lsdException w:name='List Continue 4'/><w:lsdException w:name='List Continue 5'/><w:lsdException w:name='Message Header'/><w:lsdException w:name='Subtitle'/><w:lsdException w:name='Salutation'/><w:lsdException w:name='Date'/><w:lsdException w:name='Body Text First Indent'/><w:lsdException w:name='Body Text First Indent 2'/><w:lsdException w:name='Note Heading'/><w:lsdException w:name='Body Text 2'/><w:lsdException w:name='Body Text 3'/><w:lsdException w:name='Body Text Indent 2'/><w:lsdException w:name='Body Text Indent 3'/><w:lsdException w:name='Block Text'/><w:lsdException w:name='Hyperlink'/><w:lsdException w:name='FollowedHyperlink'/><w:lsdException w:name='Strong'/><w:lsdException w:name='Emphasis'/><w:lsdException w:name='Document Map'/><w:lsdException w:name='Plain Text'/><w:lsdException w:name='E-mail Signature'/><w:lsdException w:name='HTML Top of Form'/><w:lsdException w:name='HTML Bottom of Form'/><w:lsdException w:name='Normal (Web)'/><w:lsdException w:name='HTML Acronym'/><w:lsdException w:name='HTML Address'/><w:lsdException w:name='HTML Cite'/><w:lsdException w:name='HTML Code'/><w:lsdException w:name='HTML Definition'/><w:lsdException w:name='HTML Keyboard'/><w:lsdException w:name='HTML Preformatted'/><w:lsdException w:name='HTML Sample'/><w:lsdException w:name='HTML Typewriter'/><w:lsdException w:name='HTML Variable'/><w:lsdException w:name='Normal Table'/><w:lsdException w:name='annotation subject'/><w:lsdException w:name='No List'/><w:lsdException w:name='Outline List 1'/><w:lsdException w:name='Outline List 2'/><w:lsdException w:name='Outline List 3'/><w:lsdException w:name='Table Simple 1'/><w:lsdException w:name='Table Simple 2'/><w:lsdException w:name='Table Simple 3'/><w:lsdException w:name='Table Classic 1'/><w:lsdException w:name='Table Classic 2'/><w:lsdException w:name='Table Classic 3'/><w:lsdException w:name='Table Classic 4'/><w:lsdException w:name='Table Colorful 1'/><w:lsdException w:name='Table Colorful 2'/><w:lsdException w:name='Table Colorful 3'/><w:lsdException w:name='Table Columns 1'/><w:lsdException w:name='Table Columns 2'/><w:lsdException w:name='Table Columns 3'/><w:lsdException w:name='Table Columns 4'/><w:lsdException w:name='Table Columns 5'/><w:lsdException w:name='Table Grid 1'/><w:lsdException w:name='Table Grid 2'/><w:lsdException w:name='Table Grid 3'/><w:lsdException w:name='Table Grid 4'/><w:lsdException w:name='Table Grid 5'/><w:lsdException w:name='Table Grid 6'/><w:lsdException w:name='Table Grid 7'/><w:lsdException w:name='Table Grid 8'/><w:lsdException w:name='Table List 1'/><w:lsdException w:name='Table List 2'/><w:lsdException w:name='Table List 3'/><w:lsdException w:name='Table List 4'/><w:lsdException w:name='Table List 5'/><w:lsdException w:name='Table List 6'/><w:lsdException w:name='Table List 7'/><w:lsdException w:name='Table List 8'/><w:lsdException w:name='Table 3D effects 1'/><w:lsdException w:name='Table 3D effects 2'/><w:lsdException w:name='Table 3D effects 3'/><w:lsdException w:name='Table Contemporary'/><w:lsdException w:name='Table Elegant'/><w:lsdException w:name='Table Professional'/><w:lsdException w:name='Table Subtle 1'/><w:lsdException w:name='Table Subtle 2'/><w:lsdException w:name='Table Web 1'/><w:lsdException w:name='Table Web 2'/><w:lsdException w:name='Table Web 3'/><w:lsdException w:name='Balloon Text'/><w:lsdException w:name='Table Grid'/><w:lsdException w:name='Table Theme'/><w:lsdException w:name='Note Level 1'/><w:lsdException w:name='Note Level 2'/><w:lsdException w:name='Note Level 3'/><w:lsdException w:name='Note Level 4'/><w:lsdException w:name='Note Level 5'/><w:lsdException w:name='Note Level 6'/><w:lsdException w:name='Note Level 7'/><w:lsdException w:name='Note Level 8'/><w:lsdException w:name='Note Level 9'/><w:lsdException w:name='Placeholder Text'/><w:lsdException w:name='No Spacing'/><w:lsdException w:name='Light Shading'/><w:lsdException w:name='Light List'/><w:lsdException w:name='Light Grid'/><w:lsdException w:name='Medium Shading 1'/><w:lsdException w:name='Medium Shading 2'/><w:lsdException w:name='Medium List 1'/><w:lsdException w:name='Medium List 2'/><w:lsdException w:name='Medium Grid 1'/><w:lsdException w:name='Medium Grid 2'/><w:lsdException w:name='Medium Grid 3'/><w:lsdException w:name='Dark List'/><w:lsdException w:name='Colorful Shading'/><w:lsdException w:name='Colorful List'/><w:lsdException w:name='Colorful Grid'/><w:lsdException w:name='Light Shading Accent 1'/><w:lsdException w:name='Light List Accent 1'/><w:lsdException w:name='Light Grid Accent 1'/><w:lsdException w:name='Medium Shading 1 Accent 1'/><w:lsdException w:name='Medium Shading 2 Accent 1'/><w:lsdException w:name='Medium List 1 Accent 1'/><w:lsdException w:name='Revision'/><w:lsdException w:name='List Paragraph'/><w:lsdException w:name='Quote'/><w:lsdException w:name='Intense Quote'/><w:lsdException w:name='Medium List 2 Accent 1'/><w:lsdException w:name='Medium Grid 1 Accent 1'/><w:lsdException w:name='Medium Grid 2 Accent 1'/><w:lsdException w:name='Medium Grid 3 Accent 1'/><w:lsdException w:name='Dark List Accent 1'/><w:lsdException w:name='Colorful Shading Accent 1'/><w:lsdException w:name='Colorful List Accent 1'/><w:lsdException w:name='Colorful Grid Accent 1'/><w:lsdException w:name='Light Shading Accent 2'/><w:lsdException w:name='Light List Accent 2'/><w:lsdException w:name='Light Grid Accent 2'/><w:lsdException w:name='Medium Shading 1 Accent 2'/><w:lsdException w:name='Medium Shading 2 Accent 2'/><w:lsdException w:name='Medium List 1 Accent 2'/><w:lsdException w:name='Medium List 2 Accent 2'/><w:lsdException w:name='Medium Grid 1 Accent 2'/><w:lsdException w:name='Medium Grid 2 Accent 2'/><w:lsdException w:name='Medium Grid 3 Accent 2'/><w:lsdException w:name='Dark List Accent 2'/><w:lsdException w:name='Colorful Shading Accent 2'/><w:lsdException w:name='Colorful List Accent 2'/><w:lsdException w:name='Colorful Grid Accent 2'/><w:lsdException w:name='Light Shading Accent 3'/><w:lsdException w:name='Light List Accent 3'/><w:lsdException w:name='Light Grid Accent 3'/><w:lsdException w:name='Medium Shading 1 Accent 3'/><w:lsdException w:name='Medium Shading 2 Accent 3'/><w:lsdException w:name='Medium List 1 Accent 3'/><w:lsdException w:name='Medium List 2 Accent 3'/><w:lsdException w:name='Medium Grid 1 Accent 3'/><w:lsdException w:name='Medium Grid 2 Accent 3'/><w:lsdException w:name='Medium Grid 3 Accent 3'/><w:lsdException w:name='Dark List Accent 3'/><w:lsdException w:name='Colorful Shading Accent 3'/><w:lsdException w:name='Colorful List Accent 3'/><w:lsdException w:name='Colorful Grid Accent 3'/><w:lsdException w:name='Light Shading Accent 4'/><w:lsdException w:name='Light List Accent 4'/><w:lsdException w:name='Light Grid Accent 4'/><w:lsdException w:name='Medium Shading 1 Accent 4'/><w:lsdException w:name='Medium Shading 2 Accent 4'/><w:lsdException w:name='Medium List 1 Accent 4'/><w:lsdException w:name='Medium List 2 Accent 4'/><w:lsdException w:name='Medium Grid 1 Accent 4'/><w:lsdException w:name='Medium Grid 2 Accent 4'/><w:lsdException w:name='Medium Grid 3 Accent 4'/><w:lsdException w:name='Dark List Accent 4'/><w:lsdException w:name='Colorful Shading Accent 4'/><w:lsdException w:name='Colorful List Accent 4'/><w:lsdException w:name='Colorful Grid Accent 4'/><w:lsdException w:name='Light Shading Accent 5'/><w:lsdException w:name='Light List Accent 5'/><w:lsdException w:name='Light Grid Accent 5'/><w:lsdException w:name='Medium Shading 1 Accent 5'/><w:lsdException w:name='Medium Shading 2 Accent 5'/><w:lsdException w:name='Medium List 1 Accent 5'/><w:lsdException w:name='Medium List 2 Accent 5'/><w:lsdException w:name='Medium Grid 1 Accent 5'/><w:lsdException w:name='Medium Grid 2 Accent 5'/><w:lsdException w:name='Medium Grid 3 Accent 5'/><w:lsdException w:name='Dark List Accent 5'/><w:lsdException w:name='Colorful Shading Accent 5'/><w:lsdException w:name='Colorful List Accent 5'/><w:lsdException w:name='Colorful Grid Accent 5'/><w:lsdException w:name='Light Shading Accent 6'/><w:lsdException w:name='Light List Accent 6'/><w:lsdException w:name='Light Grid Accent 6'/><w:lsdException w:name='Medium Shading 1 Accent 6'/><w:lsdException w:name='Medium Shading 2 Accent 6'/><w:lsdException w:name='Medium List 1 Accent 6'/><w:lsdException w:name='Medium List 2 Accent 6'/><w:lsdException w:name='Medium Grid 1 Accent 6'/><w:lsdException w:name='Medium Grid 2 Accent 6'/><w:lsdException w:name='Medium Grid 3 Accent 6'/><w:lsdException w:name='Dark List Accent 6'/><w:lsdException w:name='Colorful Shading Accent 6'/><w:lsdException w:name='Colorful List Accent 6'/><w:lsdException w:name='Colorful Grid Accent 6'/><w:lsdException w:name='Subtle Emphasis'/><w:lsdException w:name='Intense Emphasis'/><w:lsdException w:name='Subtle Reference'/><w:lsdException w:name='Intense Reference'/><w:lsdException w:name='Book Title'/><w:lsdException w:name='Bibliography'/><w:lsdException w:name='TOC Heading'/><w:lsdException w:name='Plain Table 1'/><w:lsdException w:name='Plain Table 2'/><w:lsdException w:name='Plain Table 3'/><w:lsdException w:name='Plain Table 4'/><w:lsdException w:name='Plain Table 5'/><w:lsdException w:name='Grid Table Light'/><w:lsdException w:name='Grid Table 1 Light'/><w:lsdException w:name='Grid Table 2'/><w:lsdException w:name='Grid Table 3'/><w:lsdException w:name='Grid Table 4'/><w:lsdException w:name='Grid Table 5 Dark'/><w:lsdException w:name='Grid Table 6 Colorful'/><w:lsdException w:name='Grid Table 7 Colorful'/><w:lsdException w:name='Grid Table 1 Light Accent 1'/><w:lsdException w:name='Grid Table 2 Accent 1'/><w:lsdException w:name='Grid Table 3 Accent 1'/><w:lsdException w:name='Grid Table 4 Accent 1'/><w:lsdException w:name='Grid Table 5 Dark Accent 1'/><w:lsdException w:name='Grid Table 6 Colorful Accent 1'/><w:lsdException w:name='Grid Table 7 Colorful Accent 1'/><w:lsdException w:name='Grid Table 1 Light Accent 2'/><w:lsdException w:name='Grid Table 2 Accent 2'/><w:lsdException w:name='Grid Table 3 Accent 2'/><w:lsdException w:name='Grid Table 4 Accent 2'/><w:lsdException w:name='Grid Table 5 Dark Accent 2'/><w:lsdException w:name='Grid Table 6 Colorful Accent 2'/><w:lsdException w:name='Grid Table 7 Colorful Accent 2'/><w:lsdException w:name='Grid Table 1 Light Accent 3'/><w:lsdException w:name='Grid Table 2 Accent 3'/><w:lsdException w:name='Grid Table 3 Accent 3'/><w:lsdException w:name='Grid Table 4 Accent 3'/><w:lsdException w:name='Grid Table 5 Dark Accent 3'/><w:lsdException w:name='Grid Table 6 Colorful Accent 3'/><w:lsdException w:name='Grid Table 7 Colorful Accent 3'/><w:lsdException w:name='Grid Table 1 Light Accent 4'/><w:lsdException w:name='Grid Table 2 Accent 4'/><w:lsdException w:name='Grid Table 3 Accent 4'/><w:lsdException w:name='Grid Table 4 Accent 4'/><w:lsdException w:name='Grid Table 5 Dark Accent 4'/><w:lsdException w:name='Grid Table 6 Colorful Accent 4'/><w:lsdException w:name='Grid Table 7 Colorful Accent 4'/><w:lsdException w:name='Grid Table 1 Light Accent 5'/><w:lsdException w:name='Grid Table 2 Accent 5'/><w:lsdException w:name='Grid Table 3 Accent 5'/><w:lsdException w:name='Grid Table 4 Accent 5'/><w:lsdException w:name='Grid Table 5 Dark Accent 5'/><w:lsdException w:name='Grid Table 6 Colorful Accent 5'/><w:lsdException w:name='Grid Table 7 Colorful Accent 5'/><w:lsdException w:name='Grid Table 1 Light Accent 6'/><w:lsdException w:name='Grid Table 2 Accent 6'/><w:lsdException w:name='Grid Table 3 Accent 6'/><w:lsdException w:name='Grid Table 4 Accent 6'/><w:lsdException w:name='Grid Table 5 Dark Accent 6'/><w:lsdException w:name='Grid Table 6 Colorful Accent 6'/><w:lsdException w:name='Grid Table 7 Colorful Accent 6'/><w:lsdException w:name='List Table 1 Light'/><w:lsdException w:name='List Table 2'/><w:lsdException w:name='List Table 3'/><w:lsdException w:name='List Table 4'/><w:lsdException w:name='List Table 5 Dark'/><w:lsdException w:name='List Table 6 Colorful'/><w:lsdException w:name='List Table 7 Colorful'/><w:lsdException w:name='List Table 1 Light Accent 1'/><w:lsdException w:name='List Table 2 Accent 1'/><w:lsdException w:name='List Table 3 Accent 1'/><w:lsdException w:name='List Table 4 Accent 1'/><w:lsdException w:name='List Table 5 Dark Accent 1'/><w:lsdException w:name='List Table 6 Colorful Accent 1'/><w:lsdException w:name='List Table 7 Colorful Accent 1'/><w:lsdException w:name='List Table 1 Light Accent 2'/><w:lsdException w:name='List Table 2 Accent 2'/><w:lsdException w:name='List Table 3 Accent 2'/><w:lsdException w:name='List Table 4 Accent 2'/><w:lsdException w:name='List Table 5 Dark Accent 2'/><w:lsdException w:name='List Table 6 Colorful Accent 2'/><w:lsdException w:name='List Table 7 Colorful Accent 2'/><w:lsdException w:name='List Table 1 Light Accent 3'/><w:lsdException w:name='List Table 2 Accent 3'/><w:lsdException w:name='List Table 3 Accent 3'/><w:lsdException w:name='List Table 4 Accent 3'/><w:lsdException w:name='List Table 5 Dark Accent 3'/><w:lsdException w:name='List Table 6 Colorful Accent 3'/><w:lsdException w:name='List Table 7 Colorful Accent 3'/><w:lsdException w:name='List Table 1 Light Accent 4'/><w:lsdException w:name='List Table 2 Accent 4'/><w:lsdException w:name='List Table 3 Accent 4'/><w:lsdException w:name='List Table 4 Accent 4'/><w:lsdException w:name='List Table 5 Dark Accent 4'/><w:lsdException w:name='List Table 6 Colorful Accent 4'/><w:lsdException w:name='List Table 7 Colorful Accent 4'/><w:lsdException w:name='List Table 1 Light Accent 5'/><w:lsdException w:name='List Table 2 Accent 5'/><w:lsdException w:name='List Table 3 Accent 5'/><w:lsdException w:name='List Table 4 Accent 5'/><w:lsdException w:name='List Table 5 Dark Accent 5'/><w:lsdException w:name='List Table 6 Colorful Accent 5'/><w:lsdException w:name='List Table 7 Colorful Accent 5'/><w:lsdException w:name='List Table 1 Light Accent 6'/><w:lsdException w:name='List Table 2 Accent 6'/><w:lsdException w:name='List Table 3 Accent 6'/><w:lsdException w:name='List Table 4 Accent 6'/><w:lsdException w:name='List Table 5 Dark Accent 6'/><w:lsdException w:name='List Table 6 Colorful Accent 6'/><w:lsdException w:name='List Table 7 Colorful Accent 6'/></w:latentStyles><w:style w:type='paragraph' w:default='on' w:styleId='a'><w:name w:val='Normal'/><wx:uiName wx:val='正文'/><w:pPr><w:widowControl w:val='off'/><w:jc w:val='both'/></w:pPr><w:rPr><wx:font wx:val='Calibri'/><w:kern w:val='2'/><w:sz w:val='24'/><w:sz-cs w:val='24'/><w:lang w:val='EN-US' w:fareast='ZH-CN' w:bidi='AR-SA'/></w:rPr></w:style><w:style w:type='character' w:default='on' w:styleId='a0'><w:name w:val='Default Paragraph Font'/><wx:uiName wx:val='默认段落字体'/></w:style><w:style w:type='table' w:default='on' w:styleId='a1'><w:name w:val='Normal Table'/><wx:uiName wx:val='普通表格'/><w:rPr><wx:font wx:val='Calibri'/><w:lang w:val='EN-US' w:fareast='ZH-CN' w:bidi='AR-SA'/></w:rPr><w:tblPr><w:tblInd w:w='0' w:type='dxa'/><w:tblCellMar><w:top w:w='0' w:type='dxa'/><w:left w:w='108' w:type='dxa'/><w:bottom w:w='0' w:type='dxa'/><w:right w:w='108' w:type='dxa'/></w:tblCellMar></w:tblPr></w:style><w:style w:type='list' w:default='on' w:styleId='a2'><w:name w:val='No List'/><wx:uiName wx:val='无列表'/></w:style><w:style w:type='table' w:styleId='a3'><w:name w:val='Table Grid'/><wx:uiName wx:val='网格型'/><w:basedOn w:val='a1'/><w:rsid w:val='00324A28'/><w:rPr><wx:font wx:val='Calibri'/></w:rPr><w:tblPr><w:tblInd w:w='0' w:type='dxa'/><w:tblBorders><w:top w:val='single' w:sz='4' wx:bdrwidth='10' w:space='0' w:color='auto'/><w:left w:val='single' w:sz='4' wx:bdrwidth='10' w:space='0' w:color='auto'/><w:bottom w:val='single' w:sz='4' wx:bdrwidth='10' w:space='0' w:color='auto'/><w:right w:val='single' w:sz='4' wx:bdrwidth='10' w:space='0' w:color='auto'/><w:insideH w:val='single' w:sz='4' wx:bdrwidth='10' w:space='0' w:color='auto'/><w:insideV w:val='single' w:sz='4' wx:bdrwidth='10' w:space='0' w:color='auto'/></w:tblBorders><w:tblCellMar><w:top w:w='0' w:type='dxa'/><w:left w:w='108' w:type='dxa'/><w:bottom w:w='0' w:type='dxa'/><w:right w:w='108' w:type='dxa'/></w:tblCellMar></w:tblPr></w:style></w:styles><w:shapeDefaults><o:shapedefaults v:ext='edit' spidmax='1026'/><o:shapelayout v:ext='edit'><o:idmap v:ext='edit' data='1'/></o:shapelayout></w:shapeDefaults><w:docPr><w:view w:val='print'/><w:zoom w:percent='130'/><w:dontDisplayPageBoundaries/><w:doNotEmbedSystemFonts/><w:bordersDontSurroundHeader/><w:bordersDontSurroundFooter/><w:defaultTabStop w:val='420'/><w:drawingGridVerticalSpacing w:val='200'/><w:displayHorizontalDrawingGridEvery w:val='0'/><w:displayVerticalDrawingGridEvery w:val='2'/><w:punctuationKerning/><w:characterSpacingControl w:val='CompressPunctuation'/><w:allowPNG/><w:doNotSaveWebPagesAsSingleFile/><w:pixelsPerInch w:val='96'/><w:savePreviewPicture/><w:validateAgainstSchema/><w:saveInvalidXML w:val='off'/><w:ignoreMixedContent w:val='off'/><w:alwaysShowPlaceholderText w:val='off'/><w:compat><w:spaceForUL/><w:balanceSingleByteDoubleByteWidth/><w:doNotLeaveBackslashAlone/><w:ulTrailSpace/><w:doNotExpandShiftReturn/><w:adjustLineHeightInTable/><w:breakWrappedTables/><w:snapToGridInCell/><w:wrapTextWithPunct/><w:useAsianBreakRules/><w:dontGrowAutofit/><w:useFELayout/></w:compat><wsp:rsids><wsp:rsidRoot wsp:val='00324A28'/><wsp:rsid wsp:val='00324A28'/><wsp:rsid wsp:val='0076265B'/><wsp:rsid wsp:val='00A20EF9'/><wsp:rsid wsp:val='00C10847'/><wsp:rsid wsp:val='00FD17C6'/></wsp:rsids></w:docPr><w:body><wx:sect><w:tbl><w:tblPr><w:tblW w:w='7835' w:type='dxa'/><w:tblInd w:w='240' w:type='dxa'/><w:tblBorders><w:top w:val='single' w:sz='4' wx:bdrwidth='10' w:space='0' w:color='auto'/><w:left w:val='single' w:sz='4' wx:bdrwidth='10' w:space='0' w:color='auto'/><w:bottom w:val='single' w:sz='4' wx:bdrwidth='10' w:space='0' w:color='auto'/><w:right w:val='single' w:sz='4' wx:bdrwidth='10' w:space='0' w:color='auto'/><w:insideH w:val='single' w:sz='4' wx:bdrwidth='10' w:space='0' w:color='auto'/><w:insideV w:val='single' w:sz='4' wx:bdrwidth='10' w:space='0' w:color='auto'/></w:tblBorders><w:tblLook w:val='04A0'/></w:tblPr><w:tblGrid><w:gridCol w:w='2763'/><w:gridCol w:w='2763'/><w:gridCol w:w='2309'/></w:tblGrid><w:tr wsp:rsidR='00324A28' wsp:rsidRPr='00FD17C6' wsp:rsidTr='00FD17C6'><w:trPr><w:trHeight w:val='773'/></w:trPr><w:tc><w:tcPr><w:tcW w:w='2763' w:type='dxa'/><w:shd w:val='clear' w:color='auto' w:fill='auto'/></w:tcPr><w:p wsp:rsidR='00324A28' wsp:rsidRPr='00FD17C6' wsp:rsidRDefault='00324A28' wsp:rsidP='00FD17C6'><w:pPr><w:jc w:val='center'/></w:pPr><w:r wsp:rsidRPr='00FD17C6'><w:rPr><wx:font wx:val='宋体'/></w:rPr><w:t>姓名</w:t></w:r></w:p></w:tc><w:tc><w:tcPr><w:tcW w:w='2763' w:type='dxa'/><w:shd w:val='clear' w:color='auto' w:fill='auto'/></w:tcPr><w:p wsp:rsidR='00324A28' wsp:rsidRPr='00FD17C6' wsp:rsidRDefault='0076265B' wsp:rsidP='00FD17C6'><w:pPr><w:jc w:val='center'/></w:pPr><w:r wsp:rsidRPr='00FD17C6'><w:t>${name}</w:t></w:r></w:p></w:tc><w:tc><w:tcPr><w:tcW w:w='2309' w:type='dxa'/><w:vmerge w:val='restart'/><w:shd w:val='clear' w:color='auto' w:fill='auto'/></w:tcPr><w:p wsp:rsidR='00324A28' wsp:rsidRPr='00FD17C6' wsp:rsidRDefault='00FD17C6' wsp:rsidP='00324A28'><w:r wsp:rsidRPr='00F9617B'><w:rPr><w:noProof/></w:rPr><w:pict><v:shapetype id='_x0000_t75' coordsize='21600,21600' o:spt='75' o:preferrelative='t' path='m@4@5l@4@11@9@11@9@5xe' filled='f' stroked='f'><v:stroke joinstyle='miter'/><v:formulas><v:f eqn='if lineDrawn pixelLineWidth 0'/><v:f eqn='sum @0 1 0'/><v:f eqn='sum 0 0 @1'/><v:f eqn='prod @2 1 2'/><v:f eqn='prod @3 21600 pixelWidth'/><v:f eqn='prod @3 21600 pixelHeight'/><v:f eqn='sum @0 0 1'/><v:f eqn='prod @6 1 2'/><v:f eqn='prod @7 21600 pixelWidth'/><v:f eqn='sum @8 21600 0'/><v:f eqn='prod @7 21600 pixelHeight'/><v:f eqn='sum @10 21600 0'/></v:formulas><v:path o:extrusionok='f' gradientshapeok='t' o:connecttype='rect'/><o:lock v:ext='edit' aspectratio='t'/></v:shapetype><w:binData w:name='wordml://01000001.gif' xml:space='preserve'>${image}</w:binData><v:shape id='_x56fe__x7247__x0020_1' o:spid='_x0000_i1025' type='#_x0000_t75' style='width:100.35pt;height:100.35pt;visibility:visible;mso-wrap-style:square'><v:imagedata src='wordml://01000001.gif' o:title=''/></v:shape></w:pict></w:r></w:p></w:tc></w:tr><w:tr wsp:rsidR='00324A28' wsp:rsidRPr='00FD17C6' wsp:rsidTr='00FD17C6'><w:trPr><w:trHeight w:val='633'/></w:trPr><w:tc><w:tcPr><w:tcW w:w='2763' w:type='dxa'/><w:shd w:val='clear' w:color='auto' w:fill='auto'/></w:tcPr><w:p wsp:rsidR='00324A28' wsp:rsidRPr='00FD17C6' wsp:rsidRDefault='00324A28' wsp:rsidP='00FD17C6'><w:pPr><w:jc w:val='center'/></w:pPr><w:r wsp:rsidRPr='00FD17C6'><w:rPr><wx:font wx:val='宋体'/></w:rPr><w:t>性别</w:t></w:r></w:p></w:tc><w:tc><w:tcPr><w:tcW w:w='2763' w:type='dxa'/><w:shd w:val='clear' w:color='auto' w:fill='auto'/></w:tcPr><w:p wsp:rsidR='00324A28' wsp:rsidRPr='00FD17C6' wsp:rsidRDefault='0076265B' wsp:rsidP='00FD17C6'><w:pPr><w:jc w:val='center'/></w:pPr><w:r wsp:rsidRPr='00FD17C6'><w:t>${sex}</w:t></w:r></w:p></w:tc><w:tc><w:tcPr><w:tcW w:w='2309' w:type='dxa'/><w:vmerge/><w:shd w:val='clear' w:color='auto' w:fill='auto'/></w:tcPr><w:p wsp:rsidR='00324A28' wsp:rsidRPr='00FD17C6' wsp:rsidRDefault='00324A28' wsp:rsidP='00324A28'/></w:tc></w:tr><w:tr wsp:rsidR='00324A28' wsp:rsidRPr='00FD17C6' wsp:rsidTr='00FD17C6'><w:trPr><w:trHeight w:val='647'/></w:trPr><w:tc><w:tcPr><w:tcW w:w='2763' w:type='dxa'/><w:shd w:val='clear' w:color='auto' w:fill='auto'/></w:tcPr><w:p wsp:rsidR='00324A28' wsp:rsidRPr='00FD17C6' wsp:rsidRDefault='00324A28' wsp:rsidP='00FD17C6'><w:pPr><w:jc w:val='center'/></w:pPr><w:r wsp:rsidRPr='00FD17C6'><w:rPr><w:rFonts w:hint='fareast'/><wx:font wx:val='宋体'/></w:rPr><w:t>年龄</w:t></w:r></w:p></w:tc><w:tc><w:tcPr><w:tcW w:w='2763' w:type='dxa'/><w:shd w:val='clear' w:color='auto' w:fill='auto'/></w:tcPr><w:p wsp:rsidR='00324A28' wsp:rsidRPr='00FD17C6' wsp:rsidRDefault='0076265B' wsp:rsidP='00FD17C6'><w:pPr><w:jc w:val='center'/></w:pPr><w:r wsp:rsidRPr='00FD17C6'><w:t>${age}</w:t></w:r></w:p></w:tc><w:tc><w:tcPr><w:tcW w:w='2309' w:type='dxa'/><w:vmerge/><w:shd w:val='clear' w:color='auto' w:fill='auto'/></w:tcPr><w:p wsp:rsidR='00324A28' wsp:rsidRPr='00FD17C6' wsp:rsidRDefault='00324A28' wsp:rsidP='00324A28'/></w:tc></w:tr></w:tbl><w:p wsp:rsidR='00AE27AE' wsp:rsidRPr='00324A28' wsp:rsidRDefault='00FD17C6' wsp:rsidP='00324A28'/><w:sectPr wsp:rsidR='00AE27AE' wsp:rsidRPr='00324A28' wsp:rsidSect='00C10847'><w:pgSz w:w='11900' w:h='16840'/><w:pgMar w:top='1440' w:right='1800' w:bottom='1440' w:left='1800' w:header='851' w:footer='992' w:gutter='0'/><w:cols w:space='425'/><w:docGrid w:type='lines' w:line-pitch='312'/></w:sectPr></wx:sect></w:body></w:wordDocument>";

    public static String getImageStr() {
        String imgFile = "/Users/carlosxiao/Desktop/111.png";
        InputStream in = null;
        byte[] data = null;
        try {
            in = new FileInputStream(imgFile);
            data = new byte[in.available()];
            in.read(data);
            in.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
        BASE64Encoder encoder = new BASE64Encoder();
        return encoder.encode(data);
    }

    public static void main (String [] args) {
        Map dataMap = new HashMap();
        dataMap.put("age", "23434324");
        dataMap.put("name", "carlosxiao");
        dataMap.put("sex", "male");
        dataMap.put("image", getImageStr());
        File file = new File("/Users/carlosxiao/Desktop/x-t.doc");
        WordExportUtil.exportWordToFile(file, template, "23", dataMap);
    }
}