日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
C#操作Word表的實(shí)例淺析

C#操作Word之添加新表

成都做網(wǎng)站、網(wǎng)站建設(shè)、外貿(mào)營銷網(wǎng)站建設(shè)的關(guān)注點(diǎn)不是能為您做些什么網(wǎng)站,而是怎么做網(wǎng)站,有沒有做好網(wǎng)站,給創(chuàng)新互聯(lián)公司一個(gè)展示的機(jī)會(huì)來證明自己,這并不會(huì)花費(fèi)您太多時(shí)間,或許會(huì)給您帶來新的靈感和驚喜。面向用戶友好,注重用戶體驗(yàn),一切以用戶為中心。

 
 
 
  1. object oMissing = System.Reflection.Missing.Value;  
  2.  
  3. Word._Application oWord;  
  4.  
  5. Word._Document oDoc;  
  6.  
  7. oWord = new Word.Application();  
  8.  
  9. oWord.Visible = true;  
  10.  
  11. oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,  
  12.     ref oMissing, ref oMissing);  
  13.  
  14. object start = 0;  
  15.  
  16. object end = 0;  
  17.  
  18. Word.Range tableLocation = oDoc.Range(ref start, ref end);  
  19.  
  20. oDoc.Tables.Add(tableLocation, 3, 4, ref oMissing, ref oMissing); 

C#操作Word之表插入行

 
 
 
  1. object oMissing = System.Reflection.Missing.Value;  
  2.  
  3. Word._Application oWord;  
  4.  
  5. Word._Document oDoc;  
  6.  
  7. oWord = new Word.Application();  
  8.  
  9. oWord.Visible = true;  
  10.  
  11. oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,  
  12.     ref oMissing, ref oMissing);  
  13.  
  14. object start = 0;  
  15.  
  16. object end = 0;  
  17.  
  18. Word.Range tableLocation = oDoc.Range(ref start, ref end);  
  19.  
  20. oDoc.Tables.Add(tableLocation, 3, 4, ref oMissing, ref oMissing);  
  21.  
  22. Word.Table newTable = oDoc.Tables[1];  
  23.  
  24. object beforeRow = newTable.Rows[1];  
  25.  
  26. newTable.Rows.Add(ref beforeRow); 

C#操作Word之單元格合并

 
 
 
  1. object oMissing = System.Reflection.Missing.Value;  
  2.  
  3. Word._Application oWord;  
  4.  
  5. Word._Document oDoc;  
  6.  
  7. oWord = new Word.Application();  
  8.  
  9. oWord.Visible = true;  
  10.  
  11. oDoc = oWord.Documents.Add  
  12. (ref oMissing, ref oMissing,  
  13. ref oMissing, ref oMissing);  
  14.  
  15. object start = 0;  
  16.  
  17. object end = 0;  
  18.  
  19. Word.Range tableLocation = oDoc.Range(ref start, ref end); 

C#操作Word的基本內(nèi)容就向你介紹到這里,希望對(duì)你了解和學(xué)習(xí)C#操作Word有所幫助。

【編輯推薦】

  1. C# 操作XML的全過程實(shí)例淺析
  2. C#操作xml文件實(shí)例詳解
  3. C#操作符重載應(yīng)用的一點(diǎn)體會(huì)
  4. C#操作符重載特點(diǎn)實(shí)例淺析
  5. C#操作Word書簽實(shí)例淺析

網(wǎng)頁標(biāo)題:C#操作Word表的實(shí)例淺析
網(wǎng)站網(wǎng)址:http://www.dlmjj.cn/article/djojphp.html