2024年6月7日发(作者:)

1.添加引用:

(我们就叫工具包吧,可以从网上下载。关于它的操作我在

“操作说明 中文版 下载 Aspose C# 导出Excel 实例”一文中的说。这里

你暂时也可不理会它。)

即使没有安装office也能用噢,这是一个好强的大工具。

2.编写Excel操作类

using System;

using c;

using ;

using ;

using ;

public class AsposeExcel

{

private string outFileName = "";

private string fullFilename = "";

private Workbook book = null;

private Worksheet sheet = null;

public AsposeExcel(string outfilename, string tempfilename) //导出构造数

{

outFileName = outfilename;

book = new Workbook();

// (tempfilename);这里我们暂时不用模板

sheet = eets[0];

}

public AsposeExcel(string fullfilename) //导入构造数

{

fullFilename = fullfilename;