WPF 根据Word模版导出数据到Word
前台.xaml文件:
<Window x:Class="Export.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<TextBox Height="23" HorizontalAlignment="Left" Margin="24,22,0,0" Name="textBox1" VerticalAlignment="Top" Width="322" />
<Button Content="Choose Stencil File" Height="23" HorizontalAlignment="Left" Margin="360,22,0,0" Name="button2" VerticalAlignment="Top" Width="131" Click="button2_Click" />
<Button Content="Export To Word" Height="44" HorizontalAlignment="Left" Margin="199,107,0,0" Name="ExportDoc" VerticalAlignment="Top" Width="100" Click="ExportDoc_Click" />
<Button Content="GetThumbnailsImage" Height="57" HorizontalAlignment="Left" Margin="160,228,0,0" Name="Thumbnails" VerticalAlignment="Top" Width="139" Click="Thumbnails_Click" />
</Grid>
</Window>
后台.cs文件:
using System;
using System.Collections.Generic;
using System.Linq;