using System; using System.IO; using System.Text; using Aspose.Cells;
public class Program
public static void Main(string args)
const string text =
@"<?xml version=""1.0"" encoding=""utf-8""?>
new License().SetLicense(new MemoryStream(Encoding.UTF8.GetBytes(text)));
Workbook workbook = new Workbook();
var y = workbook.Worksheets.Cells.Rows.Count;
So the project is a Visual Studio project, which is compiled on Windows, with the .exe moved onto Linux to run under Mono.
- AsposeBug.exe: It generated the error “Unhandled Exception:System.TypeLoadException: Could not load type ‘Aspose.Cells.CollectionBase
1' from assembly 'Aspose.Cells, Version=18.104.22.168, Culture=neutral, PublicKeyToken=716fcc553a201e56'.[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'Aspose.Cells.CollectionBase1’ from assembly ‘Aspose.Cells, Version=22.214.171.124, Culture=neutral, PublicKeyToken=716fcc553a201e56’.” for Aspose.Cells 8.4.0 & 8.63. It appears you have compiled the executable targeting Aspose.Cells 7.6.0. Could you please confirm?
- MonoTester_Cells_2.0.exe (compiled against .NET Framework 2.0): Executed without showing any error, however, mono selected the default framework 4.0 as 2.0 was not available.
- MonoTester_Cells_4.5.2.exe (compiled against .NET Framework 4.5.2): Executed fine with expected results.
var book = new Aspose.Cells.Workbook();
var sheet = book.Worksheets;
var cells = sheet.Cells;
book.Save(“output_” + Aspose.Cells.CellsHelper.GetVersion() + “.xlsx”);
Attached is a .exe and .dll that, together, about under Mono. Place in the working directory of that .exe a “license.txt” file containing a valid Aspose license.