TrainSign.Common/Excel/AsposeExcel.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Aspose.Cells;
namespace Common
{
public class AsposeExcel
{
private string outFileName = "";
private string fullFilename = "";
private Workbook book = null;
private Worksheet sheet = null;
/// <summary>
///
/// </summary>
/// <param name="outfilename">导出文件路径</param>
/// <param name="tempfilename">模板文件路径</param>
public AsposeExcel(string outfilename, string tempfilename) //导出构造数
{
Aspose.Cells.License license = new Aspose.Cells.License();
license.SetLicense("Aspose.Cells.lic");
outFileName = outfilename;
book = new Workbook();
book.Open(tempfilename);//这里我们暂时不用模板
sheet = book.Worksheets[0];
}
/// <summary>
///
/// </summary>
/// <param name="outfilename">导出文件路径</param>
/// <param name="tempfilename">导入文件路径</param>
/// <param name="tempfilename">模板文件路径</param>
public AsposeExcel(string outfilename, string fullfilename, string tempfilename) //导出构造数
{
Aspose.Cells.License license = new Aspose.Cells.License();
license.SetLicense("Aspose.Cells.lic");
outFileName = outfilename;
fullFilename = fullfilename;
book = new Workbook();
// book.Open(tempfilename);这里我们暂时不用模板
sheet = book.Worksheets[0];
}
/// <summary>
/// 导入文件路径
/// </summary>
/// <param name="fullfilename"></param>
public AsposeExcel(string fullfilename) //导入构造数
{
Aspose.Cells.License license = new Aspose.Cells.License();
license.SetLicense("Aspose.Cells.lic");
fullFilename = fullfilename;
// book = new Workbook();
// book.Open(tempfilename);
// sheet = book.Worksheets[0];
后面还有 113 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。