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

资源简介


资源截图

代码片段和文件信息

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;

namespace Excel
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            BindShow();
        }
        public void BindShow() 
        {
            DataTable dt = new DataTable();
            dt.Columns.Add(new DataColumn(“no“));
            dt.Columns.Add(new DataColumn(“name“));
            dt.Columns.Add(new DataColumn(“age“));
            dt.Columns.Add(new DataColumn(“sex“));
            DataRow dr = dt.NewRow();
            

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-12-04 12:55  Excel\
     目录           0  2012-12-04 12:55  Excel\Excel\
     文件         857  2012-10-15 15:00  Excel\Excel.sln
     文件       20480  2012-10-15 15:26  Excel\Excel.suo
     目录           0  2012-12-04 12:55  Excel\Excel\bin\
     目录           0  2012-12-04 12:55  Excel\Excel\bin\Debug\
     文件       15360  2012-10-15 15:26  Excel\Excel\bin\Debug\Excel.exe
     文件       26112  2012-10-15 15:26  Excel\Excel\bin\Debug\Excel.pdb
     文件       11600  2012-10-15 15:26  Excel\Excel\bin\Debug\Excel.vshost.exe
     文件         490  2010-03-17 22:39  Excel\Excel\bin\Debug\Excel.vshost.exe.manifest
     文件        3864  2012-10-15 15:22  Excel\Excel\Excel.csproj
     文件        2203  2012-10-15 15:26  Excel\Excel\Form1.cs
     文件        5331  2012-10-15 15:17  Excel\Excel\Form1.Designer.cs
     文件        6758  2012-10-15 15:17  Excel\Excel\Form1.resx
     目录           0  2012-12-04 12:55  Excel\Excel\obj\
     目录           0  2012-12-04 12:55  Excel\Excel\obj\x86\
     目录           0  2012-12-04 12:55  Excel\Excel\obj\x86\Debug\
     文件        2152  2012-10-15 15:00  Excel\Excel\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        6507  2012-10-15 15:26  Excel\Excel\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件        1153  2012-10-15 15:26  Excel\Excel\obj\x86\Debug\Excel.csproj.FileListAbsolute.txt
     文件       15360  2012-10-15 15:26  Excel\Excel\obj\x86\Debug\Excel.exe
     文件         180  2012-10-15 15:22  Excel\Excel\obj\x86\Debug\Excel.Form1.resources
     文件       26112  2012-10-15 15:26  Excel\Excel\obj\x86\Debug\Excel.pdb
     文件         180  2012-10-15 15:22  Excel\Excel\obj\x86\Debug\Excel.Properties.Resources.resources
     文件         456  2012-10-15 15:22  Excel\Excel\obj\x86\Debug\GenerateResource.read.1.tlog
     文件        1002  2012-10-15 15:22  Excel\Excel\obj\x86\Debug\GenerateResource.write.1.tlog
     目录           0  2012-10-15 15:37  Excel\Excel\obj\x86\Debug\TempPE\
     文件         486  2012-10-15 15:00  Excel\Excel\Program.cs
     目录           0  2012-12-04 12:55  Excel\Excel\Properties\
     文件        1358  2012-10-15 15:00  Excel\Excel\Properties\AssemblyInfo.cs
     文件        2858  2012-10-15 15:00  Excel\Excel\Properties\Resources.Designer.cs
............此处省略3个文件信息

评论

共有 条评论