<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feeds.feedsky.com/styles/temp01.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feeds.feedsky.com/csdn.net/luckisok" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feeds.feedsky.com/csdn.net/luckisok" type="application/rss+xml"></fs:self_link><lastBuildDate>Thu, 18 Jun 2009 16:18:00 GMT</lastBuildDate><title>luckisok的专栏</title><description>开心就好</description><link>http://blog.csdn.net/luckisok/</link><item><title>新版公农历转换类（C#） 转BlueDog专栏</title><link>http://blog.csdn.net/luckisok/archive/2009/06/18/4280260.aspx</link><wfw:comment>http://blog.csdn.net/luckisok/comments/4280260.aspx</wfw:comment><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/luckisok/comments/commentRss/4280260.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4280260</trackback:ping><description>&lt;br /&gt;using System;&lt;br /&gt;namespace ExpertLib.ChinaSpecial&lt;br /&gt;{&lt;br /&gt;    #region ChineseCalendarException&lt;br /&gt;    /// &lt;br /&gt;    /// 中国日历异常处理&lt;br /&gt;    /// &lt;br /&gt;    public class ChineseCalendarException : System.Exception&lt;br /&gt;    {&lt;br /&gt;        public ChineseCalendarException(string msg) :base(msg)&lt;br /&gt;        {&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    #endregion&lt;br /&gt;    /// &lt;br /&gt;    /// 中国农历类 版本V1.0 支持 1900.1.31日起至 2049.12.31日止的数据&lt;br /&gt;    /// &lt;br /&gt;    /// &lt;img src =&quot;http://blog.csdn.net/luckisok/aggbug/4280260.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/236643630/luckisok/csdn.net/s.gif?r=http://blog.csdn.net/luckisok/archive/2009/06/18/4280260.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/luckisok/236643630/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/luckisok/236643630/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Fri, 19 Jun 2009 00:18:00 +0800</pubDate><author>luckisok</author><comments>http://blog.csdn.net/luckisok/archive/2009/06/18/4280260.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/luckisok/archive/2009/06/18/4280260.aspx</guid><dc:creator>luckisok</dc:creator><fs:srclink>http://blog.csdn.net/luckisok/archive/2009/06/18/4280260.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/luckisok/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/luckisok/~1208389/236643630/1208364</fs:itemid></item><item><title>在C#中使用代理的方式触发事件</title><link>http://blog.csdn.net/luckisok/archive/2009/05/08/4159855.aspx</link><wfw:comment>http://blog.csdn.net/luckisok/comments/4159855.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/luckisok/comments/commentRss/4159855.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4159855</trackback:ping><description>    事件（event）是一个非常重要的概念，我们的程序时刻都在触发和接收着各种事件：鼠标点击事件，键盘事件，以及处理操作系统的各种事件。所谓事件就是由某个对象发出的消息。比如用户按下了某个按钮，某个文件发生了改变，socket上有数据到达。触发事件的对象称作发送者（sender），捕获事件并且做出响应的对象称作接收者（receiver），一个事件可以存在多个接受者。在异步机制中，事件是线程之间进行通信的一个非常常用的方式。比如：用户在界面上按下一个按钮，执行某项耗时的任务。程序此时启动一个线程来处理这个任务，用户界面上显示一个进度条指示用户任务执行的状态。这个功能就可以使用事件来进行处理。可以将处理任务的类作为消息的发送者，任务开始时，发出“TaskStart”事件，任务进行中的不同时刻发出“TaskDoing”事件，并且携带参数说明任务进行的比例，任务结束的时候发出“TaskDone”事件，在画面中接收并且处理这些事件。这样实现了功能，并且界面和后台执行任务的模块耦合程度也是最低的。   具体说C#语言，事件的实现依赖于“代&lt;img src =&quot;http://blog.csdn.net/luckisok/aggbug/4159855.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/luckisok/236643631/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/luckisok/236643631/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Fri, 08 May 2009 18:12:00 +0800</pubDate><author>luckisok</author><comments>http://blog.csdn.net/luckisok/archive/2009/05/08/4159855.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/luckisok/archive/2009/05/08/4159855.aspx</guid><dc:creator>luckisok</dc:creator><fs:srclink>http://blog.csdn.net/luckisok/archive/2009/05/08/4159855.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/luckisok/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/luckisok/~1208389/236643631/1208364</fs:itemid></item><item><title>通信达股票数据格式读取程序</title><link>http://blog.csdn.net/luckisok/archive/2009/04/16/4085567.aspx</link><wfw:comment>http://blog.csdn.net/luckisok/comments/4085567.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/luckisok/comments/commentRss/4085567.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4085567</trackback:ping><description>通信达股票数据格式读取程序2008-11-21 19:39&lt;br /&gt;例如读取600237 铜峰电子得日数据.&lt;br /&gt;使用ultraedit 带开D:\common\stock\jcb_gx\Vipdoc\sh\lday\sh600237.day文件&lt;br /&gt;显示如下：&lt;br /&gt;49 7E 31 01 3F 07 00 00 56 07 00 00 3F 04 00 00&lt;br /&gt;3F 07 00 00 97 B0 8D 49 C0 F3 00 00 44 07 00 00&lt;br /&gt;这是是31字节，没四个字节一组数据&lt;br /&gt;分别表示如下信息：&lt;br /&gt;日期 开盘价 最高价 最低价 收盘价 成交量&lt;br /&gt;日期信息： 49 7E 31 01   =&gt; 十六进制 01 31 7E 49 =&gt; 十进制 20020809 代表了2002年8月9日得数据&lt;br /&gt;开盘价：    3F 07 00 00   =&gt; 十六进制 00 00 07 3F=&gt; 十进制 1855      除以100就代表开盘价位18.55元&lt;br /&gt;最高价      56 07 00 00   =&gt;&lt;img src =&quot;http://blog.csdn.net/luckisok/aggbug/4085567.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/luckisok/236643632/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/luckisok/236643632/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Fri, 17 Apr 2009 06:35:00 +0800</pubDate><author>luckisok</author><comments>http://blog.csdn.net/luckisok/archive/2009/04/16/4085567.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/luckisok/archive/2009/04/16/4085567.aspx</guid><dc:creator>luckisok</dc:creator><fs:srclink>http://blog.csdn.net/luckisok/archive/2009/04/16/4085567.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/luckisok/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/luckisok/~1208389/236643632/1208364</fs:itemid></item><item><title>c# 矩阵计算（转）</title><link>http://blog.csdn.net/luckisok/archive/2009/04/11/4064359.aspx</link><wfw:comment>http://blog.csdn.net/luckisok/comments/4064359.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/luckisok/comments/commentRss/4064359.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4064359</trackback:ping><description>2005/5/15C#矩阵类在做神经网络类的时候自己写的矩阵类，重载了基本运算符，提供了转秩、求逆函数 求逆没有检测矩阵的秩是否符合要求。而且此矩阵类运算效率并不是很高，只可用于试验，或者数量级为100左右的矩阵运算。 下面是具体代码（使用System以及System.Math）  public struct NNMatrix {  public int row,col;  public double[,] Matrix;   public NNMatrix(int Mrow,int Mcol)  //指定行列数创建矩阵，初始值为0矩阵  {   row = Mrow;   col = Mcol;   Matrix = new double[row,col];   for(int i=0;i    for(int j=0;j     Matrix[i,j]=0;&lt;img src =&quot;http://blog.csdn.net/luckisok/aggbug/4064359.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/luckisok/236643633/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/luckisok/236643633/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 11 Apr 2009 18:34:00 +0800</pubDate><author>luckisok</author><comments>http://blog.csdn.net/luckisok/archive/2009/04/11/4064359.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/luckisok/archive/2009/04/11/4064359.aspx</guid><dc:creator>luckisok</dc:creator><fs:srclink>http://blog.csdn.net/luckisok/archive/2009/04/11/4064359.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/luckisok/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/luckisok/~1208389/236643633/1208364</fs:itemid></item><item><title>c#在WORD中添加目录</title><link>http://blog.csdn.net/luckisok/archive/2009/01/10/3747475.aspx</link><wfw:comment>http://blog.csdn.net/luckisok/comments/3747475.aspx</wfw:comment><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/luckisok/comments/commentRss/3747475.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=3747475</trackback:ping><description>&lt;br /&gt;      void AddContent(ref   Word.Appliction app)&lt;br /&gt;&lt;br /&gt;      {&lt;br /&gt;&lt;br /&gt;              app.Selection.Start=0;&lt;br /&gt;&lt;br /&gt;              app.Selection.End=0;//将光标移动到文档开始位置&lt;br /&gt;&lt;br /&gt;             object beginLevel=2;//目录开始深度&lt;br /&gt;&lt;br /&gt;&amp;n&lt;img src =&quot;http://blog.csdn.net/luckisok/aggbug/3747475.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/luckisok/236643634/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/luckisok/236643634/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 11 Jan 2009 04:55:00 +0800</pubDate><author>luckisok</author><comments>http://blog.csdn.net/luckisok/archive/2009/01/10/3747475.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/luckisok/archive/2009/01/10/3747475.aspx</guid><dc:creator>luckisok</dc:creator><fs:srclink>http://blog.csdn.net/luckisok/archive/2009/01/10/3747475.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/luckisok/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/luckisok/~1208389/236643634/1208364</fs:itemid></item><item><title>如何进行DataGridView单元格验证</title><link>http://blog.csdn.net/luckisok/archive/2008/11/22/3349528.aspx</link><wfw:comment>http://blog.csdn.net/luckisok/comments/3349528.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/luckisok/comments/commentRss/3349528.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=3349528</trackback:ping><description>定义单元格验证&lt;br /&gt;要求：&lt;br /&gt;验证错误后焦点不离开。&lt;br /&gt;实现：&lt;br /&gt;单元格的验证可以使用dgv_details_CellValidating事件。&lt;br /&gt;验证不通过时调用e.Cancel = true;终止事件链，单元格将保持编辑状态。&lt;br /&gt;调用dgv_details.CancelEdit();可以使单元格的内容会滚到修改前的值。&lt;br /&gt;使用System.Windows.Forms.SendKeys.Send(&quot;^a&quot;);将全选单元格的内容。&lt;br /&gt;&lt;br /&gt;单元格选中并开始编辑状态&lt;br /&gt;实现：&lt;br /&gt;//DataGridView获得焦点&lt;br /&gt;dgv_details.Focus();&lt;br /&gt;//DataGridView指定当前单元格&lt;br /&gt;dgv_details.CurrentCell = dgv_details[0, 0];&lt;br /&gt;//开始编辑状态&lt;br /&gt;dgv_details.BeginEdit(false);&lt;br /&gt;&lt;br /&gt;定制自动生成绑定了列&lt;br /&gt;实现：&lt;br /&gt;dgv_deta&lt;img src =&quot;http://blog.csdn.net/luckisok/aggbug/3349528.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/luckisok/236643635/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/luckisok/236643635/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 22 Nov 2008 19:38:00 +0800</pubDate><author>luckisok</author><comments>http://blog.csdn.net/luckisok/archive/2008/11/22/3349528.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/luckisok/archive/2008/11/22/3349528.aspx</guid><dc:creator>luckisok</dc:creator><fs:srclink>http://blog.csdn.net/luckisok/archive/2008/11/22/3349528.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/luckisok/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/luckisok/~1208389/236643635/1208364</fs:itemid></item><item><title>word 模型</title><link>http://blog.csdn.net/luckisok/archive/2008/11/03/3213177.aspx</link><wfw:comment>http://blog.csdn.net/luckisok/comments/3213177.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/luckisok/comments/commentRss/3213177.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=3213177</trackback:ping><description>&lt;br /&gt;1  Word组件对象模型   &lt;br /&gt;Microsoft Office Word 2003 对象是按层次顺序排列的，层次结构顶端的两个主类是 Application 类和 Document 类。这两个类非常重要，因为在大部分时间里，您要么是在使用 Word 应用程序本身，要么是以某种方式处理 Word 文档。Word 对象模型严格遵循用户界面。Application 对象提供整个应用程序的包装，每个 Document 对象表示单个 Word 文档。这些对象各自都有很多方法和属性，您可以使用这些方法和属性操作对象或与对象交互。&lt;br /&gt;Application 对象。Application 对象表示 Word 应用程序，是其他所有对象的父级。它的所有成员通常作为一个整体应用于 Word。可以使用该对象的属性和方法来控制 Word 环境。&lt;br /&gt;Document 对象。Document 对象是 Word 编程的中枢。当您打开文档或创建新文档时，就创建了新的 Document 对象，该对象被添加到 Word 的 Documents 集合中。焦点所在的文档叫做活动文档，由&lt;img src =&quot;http://blog.csdn.net/luckisok/aggbug/3213177.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/luckisok/236643636/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/luckisok/236643636/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 04 Nov 2008 06:55:00 +0800</pubDate><author>luckisok</author><comments>http://blog.csdn.net/luckisok/archive/2008/11/03/3213177.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/luckisok/archive/2008/11/03/3213177.aspx</guid><dc:creator>luckisok</dc:creator><fs:srclink>http://blog.csdn.net/luckisok/archive/2008/11/03/3213177.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/luckisok/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/luckisok/~1208389/236643636/1208364</fs:itemid></item><item><title>word 输出目录</title><link>http://blog.csdn.net/luckisok/archive/2008/11/03/3213104.aspx</link><wfw:comment>http://blog.csdn.net/luckisok/comments/3213104.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/luckisok/comments/commentRss/3213104.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=3213104</trackback:ping><description>function doPrint(servlet, form) {&lt;br /&gt;    var oWord = new ActiveXObject(&quot;Word.Application&quot;);&lt;br /&gt;    var oDoc = oWord.Documents.Add(&quot;&quot;,0,1);&lt;br /&gt;    var strFields = form.elements[&quot;gFields&quot;].value;&lt;br /&gt;    var fields = strFields.split(&quot;,&quot;);&lt;br /&gt;    oWord.Selection.TypeParagraph();    &lt;br /&gt;    oWord.Selection.Style = oDoc.Styles(&quot;正文&quot;);&lt;br /&gt;    var wdPageBreak = 7;&lt;br /&gt;    oWord.Selection.InsertBreak(wdPageBreak);        //生成下一页，用于产生正文部分。当前页用于生成目录&lt;br /&gt;    for(var i=0;i&lt;img src =&quot;http://blog.csdn.net/luckisok/aggbug/3213104.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/luckisok/236643637/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/luckisok/236643637/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 04 Nov 2008 06:46:00 +0800</pubDate><author>luckisok</author><comments>http://blog.csdn.net/luckisok/archive/2008/11/03/3213104.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/luckisok/archive/2008/11/03/3213104.aspx</guid><dc:creator>luckisok</dc:creator><fs:srclink>http://blog.csdn.net/luckisok/archive/2008/11/03/3213104.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/luckisok/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/luckisok/~1208389/236643637/1208364</fs:itemid></item><item><title>net对word的操作</title><link>http://blog.csdn.net/luckisok/archive/2008/10/25/3141971.aspx</link><wfw:comment>http://blog.csdn.net/luckisok/comments/3141971.aspx</wfw:comment><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/luckisok/comments/commentRss/3141971.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=3141971</trackback:ping><description>&lt;br /&gt;在.net环境里对word的操作主要包括:&lt;br /&gt;1.创建word文档&lt;br /&gt;2.往word中写入内容&lt;br /&gt;3.保存&lt;br /&gt;主要是往word写入的内容,包括标题,表格等等.&lt;br /&gt;在word的版本中.net支持2003版本,&lt;br /&gt;在创建word之前要做的工作:&lt;br /&gt;1&gt;创建一个.net的项目&lt;br /&gt;2&gt;添加引用:选择.Net-&gt;选择Microsoft Word 11.0 Object Library&lt;br /&gt;3&gt;添加引用:在office安装程序中找到Office.dll和Microsoft.Office.Interop.Word.dll。&lt;br /&gt;下面就可以编写代码了&lt;br /&gt;以下是给出例子加以讲解，对word的操作就变得非常简单了，网上的许多资料都很繁琐&lt;br /&gt;在设计的时候，可以先创建一个操作类这样就可以节省很多代码，而且用起来非常的方便&lt;br /&gt;下面是ClassWord.cs文件Code&lt;br /&gt;  1using System;&lt;br /&gt;  2using System.Data;&lt;br /&gt;  3using Syst&lt;img src =&quot;http://blog.csdn.net/luckisok/aggbug/3141971.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/luckisok/236643638/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/luckisok/236643638/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 25 Oct 2008 18:34:00 +0800</pubDate><author>luckisok</author><comments>http://blog.csdn.net/luckisok/archive/2008/10/25/3141971.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/luckisok/archive/2008/10/25/3141971.aspx</guid><dc:creator>luckisok</dc:creator><fs:srclink>http://blog.csdn.net/luckisok/archive/2008/10/25/3141971.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/luckisok/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/luckisok/~1208389/236643638/1208364</fs:itemid></item><item><title>c# 生成 word</title><link>http://blog.csdn.net/luckisok/archive/2008/10/25/3141915.aspx</link><wfw:comment>http://blog.csdn.net/luckisok/comments/3141915.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/luckisok/comments/commentRss/3141915.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=3141915</trackback:ping><description>&lt;br /&gt;转载自 微软MSDN&lt;br /&gt;private void button1_Click(object sender, System.EventArgs e)&lt;br /&gt;{&lt;br /&gt;object oMissing = System.Reflection.Missing.Value;&lt;br /&gt;object oEndOfDoc = &quot;\\endofdoc&quot;; &lt;br /&gt;/* \endofdoc是预定义的bookmark */&lt;br /&gt;&lt;br /&gt;//创建一个document.&lt;br /&gt;Word._Application oWord;&lt;br /&gt;Word._Document oDoc;&lt;br /&gt;oWord = new Word.Application();&lt;br /&gt;oWord.Visible = true;&lt;br /&gt;oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,&lt;br /&gt;ref oMissing, ref oMissing);&lt;br /&gt;&lt;br /&gt;//在document的开始部分添加一个paragrap&lt;img src =&quot;http://blog.csdn.net/luckisok/aggbug/3141915.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/luckisok/236643639/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/luckisok/236643639/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 25 Oct 2008 18:29:00 +0800</pubDate><author>luckisok</author><comments>http://blog.csdn.net/luckisok/archive/2008/10/25/3141915.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/luckisok/archive/2008/10/25/3141915.aspx</guid><dc:creator>luckisok</dc:creator><fs:srclink>http://blog.csdn.net/luckisok/archive/2008/10/25/3141915.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/luckisok/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/luckisok/~1208389/236643639/1208364</fs:itemid></item></channel></rss>