你的位置:首页 > ASP.net教程

[ASP.net教程]Csharp: create word file using Open XML SDK 2.5

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using DocumentFormat.Open

  

/// <summary>    ///     /// </summary>    /// <param name="sourceFile"></param>    /// <param name="destinationFile"></param>    private void setWord(string sourceFile, string destinationFile)    {      File.Copy(sourceFile, destinationFile, true);      using (WordprocessingDocument document = WordprocessingDocument.Open(destinationFile, true))      {        // Change the document type to Document DocumentFormat.Open