在单声道上使用Aspose.Cells打开2个excel文件时出错

我正在用Mono和Aspose.Cells编写一个小程序。 我堆栈的问题,Aspose.Cell不打开2个Excel文件在一个项目。 这是我的代码:

protected string GetCellValue(string excelFileName, int row, int cell) { string cellValue = null; Workbook wb = new Workbook (excelFileName); Worksheet sheet = wb.Worksheets[0]; if (sheet.Cells [row, cell].Value != null) { cellValue = sheet.Cells [row, cell].Value.ToString (); } sheet = null; wb.Dispose (); GC.Collect (); return cellValue; } protected static int GetRowCount(string anotherExcelFileName) { int count = 0; Workbook wb = new Workbook (anotherExcelFileName); Worksheet sheet = wb.Worksheets[0]; count = sheet.Cells.Rows.Count; return count; } 

Interesting Posts