• 大小: 0.41M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: C#  c  导出  

资源简介

C#导出EXECL多样式

资源截图

代码片段和文件信息

using NPOI.HPSF;
using NPOI.HSSF.UserModel;
using NPOI.HSSF.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsFormsApplication1
{
    class Class1
    {

        ///    
        /// DataTable导出到Excel的MemoryStream   
        /// 
   
        /// 源DataTable   
        /// 表头文本   
        public static MemoryStream Export(DataTable dtSource string strHeaderText)
        {
            HSSFWorkbook workbook = new HSSFWorkbook();
            HSSFSheet sheet = workbook.CreateSheet(“Sheet1“);

            #region 右击文件 属性信息
            {
                DocumentS

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     54784  2018-07-13 16:28  WindowsFormsApplication1\.vs\WindowsFormsApplication1\v14\.suo

     文件        189  2018-07-13 09:54  WindowsFormsApplication1\WindowsFormsApplication1\App.config

     文件      11264  2014-10-15 15:01  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\MyNPOI.dll

     文件      91648  2010-01-29 16:44  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\NPOI.DDF.dll

     文件       9728  2010-01-29 16:44  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\NPOI.dll

     文件      53248  2010-01-29 16:44  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\NPOI.HPSF.dll

     文件     921600  2010-01-29 16:44  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\NPOI.HSSF.dll

     文件      48640  2010-01-29 16:44  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\NPOI.POIFS.dll

     文件      33792  2010-01-29 16:44  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\NPOI.Util.dll

     文件      14848  2018-07-13 16:26  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe

     文件        189  2018-07-13 09:54  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe.config

     文件      26112  2018-07-13 16:26  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb

     文件      22696  2018-07-13 16:27  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe

     文件        189  2018-07-13 09:54  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.config

     文件        490  2017-09-29 21:43  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest

     文件      10878  2018-07-13 16:25  WindowsFormsApplication1\WindowsFormsApplication1\Class1.cs

     文件       1885  2018-07-13 16:26  WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs

     文件       3064  2018-07-13 16:26  WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs

     文件       5817  2018-07-13 16:26  WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx

     文件       1464  2018-07-13 16:21  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       7707  2018-07-13 10:17  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件          0  2018-07-13 09:54  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2018-07-13 09:54  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2018-07-13 09:54  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件       1992  2018-07-13 16:27  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt

     文件       1012  2018-07-13 16:26  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache

     文件      31419  2018-07-13 10:18  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csprojResolveAssemblyReference.cache

     文件      14848  2018-07-13 16:26  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.exe

     文件        180  2018-07-13 16:26  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Form1.resources

     文件      26112  2018-07-13 16:26  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.pdb

............此处省略23个文件信息

评论

共有 条评论