作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我创建了一个返回 datatable
的函数来自 workbook
.
public async Task<DataTable> GetDataTableFromTabRowColumn(string sheetName, int startRow, int endRow, int startCol, int endCol)
{
var task = new Task(() =>
{
DataTable dt = new DataTable();
Workbook wb = new Workbook(FilePath); // error line
Worksheet worksheet = wb.Worksheets[sheetName];
dt = worksheet.Cells.ExportDataTable(startRow - 1, startCol - 1, (endRow - startRow + 1), (endCol - startCol + 1), options);
});
task.Start();
await task;
return dt;
}
Aspose.Cells.CellsException: 'You are using an evaluation copy and have opened files exceeding limitation.'
最佳答案
您必须通过 these methods 添加许可证 Aspose
Aspose.Cells tries to find the license in the following locations:
Explicit path The folder that contains Aspose.Cells.dll
The folder that contains the assembly that called Aspose.Cells.dll
The folderthat contains the entry assembly (your .exe)
An embedded resource inthe assembly that called Aspose.Cells.dll
//Instantiate an instance of license and set the license file through its path
Aspose.Cells.License license = new Aspose.Cells.License();
license.SetLicense("Aspose.Cells.lic");
//Instantiate an instance of license and set the license through a stream
Aspose.Cells.License license = new Aspose.Cells.License();
license.SetLicense(myStream);
关于c# - Aspose.Cells.CellsException - "You are using an evaluation copy and have opened files exceeding limitation",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54004259/
我是一名优秀的程序员,十分优秀!