91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.46MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-11-06
  • 語言: C#
  • 標簽: NPOI??

資源簡介

兼容word2007的NPOI創建DOCX例子,vs2010,例中提供了創建表、插圖和圖表實現的代碼,NPOI是tonyqus提供的2.1.1.0源碼經過新修改編譯。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Windows.Forms;
using?System.IO;
using?NPOI.XWPF.UserModel;
using?NPOI.OpenxmlFormats.Wordprocessing;
using?NPOI.XSSF.UserModel;
using?NPOI.SS.UserModel;
using?NPOI.OpenxmlFormats.Dml.Chart;
using?NPOI.OpenxmlFormats.Dml.WordProcessing;


/*
?*?本例子提供的NPOI是tonyqus提供的2.1.1.0源碼經過修改編譯。
?*?例中包括:
?*?1、頁眉頁腳設置
?*?2、插圖表操作:分inline和anchor兩種方式,提供餅圖和柱狀圖實例,其它圖表沒有提供實例
?*?vs2010
?*?netframework4
?*?創建的docx在word2007可以打開
?*?2014-9-18
?*?
?*/
namespace?CreateChart
{
????public?partial?class?Form1?:?Form
????{
????????const?String?m_savefilepath?=?“d:\\doc\\NPOI“;
????????public?Form1()
????????{
????????????InitializeComponent();
????????}

????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????//inline
????????????/*
?????????????*?創建餅圖
?????????????*/
????????????MemoryStream?ms?=?new?MemoryStream();
????????????XWPFDocument?m_Docx?=?new?XWPFDocument();
????????????m_Docx?=?CreatepieCharttoDocxwithinline();
????????????m_Docx.Write(ms);
????????????ms.Flush();
????????????SaveToFile(ms?m_savefilepath?+?“\\NPOIChart\\CreatepieChartwithinline.docx“);
????????}
????????private?void?button2_Click(object?sender?EventArgs?e)
????????{
????????????//inline
????????????/*
?????????????*?創建柱狀圖
?????????????*/

????????????MemoryStream?ms?=?new?MemoryStream();
????????????XWPFDocument?m_Docx?=?new?XWPFDocument();
????????????m_Docx?=?CreatebarCharttoDocxwithinline();
????????????m_Docx.Write(ms);
????????????ms.Flush();
????????????SaveToFile(ms?m_savefilepath?+?“\\NPOIChart\\CreatebarChartwithinline.docx“);
????????}
????????private?void?button3_Click(object?sender?EventArgs?e)
????????{
????????????//anchor方式的餅圖
????????????MemoryStream?ms?=?new?MemoryStream();
????????????XWPFDocument?m_Docx?=?new?XWPFDocument();
????????????m_Docx?=?CreateCharttoDocxwithAnchor();
????????????m_Docx.Write(ms);
????????????ms.Flush();
????????????SaveToFile(ms?m_savefilepath?+?“\\NPOIChart\\Chartwithanchor.docx“);

????????}

????????protected?XWPFDocument?CreatepieCharttoDocxwithinline()
????????{
????????????//inline
????????????//創建不同設計的餅圖
????????????XWPFDocument?m_Docx?=?new?XWPFDocument();
????????????//頁面設置
????????????//A4:W=11906h=16838
????????????//CT_SectPr?m_SectPr?=?m_Docx.Document.body.AddNewSectPr();
????????????m_Docx.Document.body.sectPr?=?new?CT_SectPr();
????????????CT_SectPr?m_SectPr?=?m_Docx.Document.body.sectPr;
????????????//頁面設置A4橫向
????????????m_SectPr.pgSz.w?=?(ulong)16838;
????????????m_SectPr.pgSz.h?=?(ulong)11906;

????????????//創建頁腳
????????????CT_Ftr?m_ftr?=?new?CT_Ftr();
????????????m_ftr.AddNewP().AddNewR().AddNewT().Value?=?“fff“;//頁腳內容
????????????//創建頁腳關系(footern.xml)
????????????XWPFRelation?Frelation?=?XWPFRelation.FOOTER;
????????????XWPFFooter?m_f?=?(XWPFFooter)m_Docx.CreateRelationship(Frelation?XWPFFactory.GetInstance()?m_Docx.FooterList.Count?+?1);
?????????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????56979??2014-10-09?13:17??NPOI操作DOCX.docx

?????文件??????11600??2014-10-09?13:23??CreateChart\CreateChart\bin\Debug\CreateChart.vshost.exe

?????文件????????490??2010-03-17?22:39??CreateChart\CreateChart\bin\Debug\CreateChart.vshost.exe.manifest

?????文件???????4993??2014-09-28?08:37??CreateChart\CreateChart\CreateChart.csproj

?????文件??????69202??2014-10-09?09:53??CreateChart\CreateChart\Form1.cs

?????文件???????3330??2014-09-23?11:45??CreateChart\CreateChart\Form1.Designer.cs

?????文件???????5817??2014-09-23?11:45??CreateChart\CreateChart\Form1.resx

?????文件???????4440??2014-09-07?16:25??CreateChart\CreateChart\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

?????文件???????6500??2014-10-09?09:53??CreateChart\CreateChart\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件????????492??2014-08-27?01:33??CreateChart\CreateChart\Program.cs

?????文件???????1354??2014-08-27?01:33??CreateChart\CreateChart\Properties\AssemblyInfo.cs

?????文件???????2873??2014-08-27?01:33??CreateChart\CreateChart\Properties\Resources.Designer.cs

?????文件???????5612??2014-08-27?01:33??CreateChart\CreateChart\Properties\Resources.resx

?????文件???????1097??2014-08-27?01:33??CreateChart\CreateChart\Properties\Settings.Designer.cs

?????文件????????249??2014-08-27?01:33??CreateChart\CreateChart\Properties\Settings.settings

?????文件????????875??2014-08-27?01:33??CreateChart\CreateChart.sln

????..A..H.?????70144??2014-10-09?13:23??CreateChart\CreateChart.suo

?????文件?????200704??2014-08-14?10:51??NPOI\ICSharpCode.SharpZipLib.dll

?????文件????1775104??2014-10-09?07:40??NPOI\NPOI.dll

?????文件?????429568??2014-10-09?07:40??NPOI\NPOI.OOxml.dll

?????文件??????93696??2014-10-09?07:40??NPOI\NPOI.Openxml4Net.dll

?????文件????2113024??2014-10-09?07:40??NPOI\NPOI.OpenxmlFormats.dll

?????文件??????11600??2014-06-02?16:28??NPOICreateDocx\NPOICreateDocx\bin\Debug\NPOICreateDocx.vshost.exe

?????文件??????11600??2014-10-09?13:23??NPOICreateDocx\NPOICreateDocx\bin\Release\NPOICreateDocx.vshost.exe

?????文件????????490??2010-03-17?22:39??NPOICreateDocx\NPOICreateDocx\bin\Release\NPOICreateDocx.vshost.exe.manifest

?????文件??????20275??2014-10-08?18:09??NPOICreateDocx\NPOICreateDocx\Form1.cs

?????文件???????2037??2014-04-28?11:26??NPOICreateDocx\NPOICreateDocx\Form1.Designer.cs

?????文件???????5817??2014-04-28?11:26??NPOICreateDocx\NPOICreateDocx\Form1.resx

?????文件???????6664??2014-09-28?08:43??NPOICreateDocx\NPOICreateDocx\NPOICreateDocx.csproj

?????文件????????451??2014-05-07?17:25??NPOICreateDocx\NPOICreateDocx\NPOICreateDocx.csproj.user

............此處省略77個文件信息

評論

共有 條評論