I’m doing an analysis to purchase the component but when creating a file using the following code:
var fileName = “D:\TESTE2.ods”;
SpreadsheetInfo.SetLicense(“FREE-LIMITED-KEY”);
// Create a new empty workbook.
// Create a new spreadsheet
var workbook = new ExcelFile();
var worksheet = workbook.Worksheets.Add(“Sheet1”);
// Add some content to the spreadsheet
worksheet.Cells[0, 0].Value = “Hello, World!”;
worksheet.Cells[1, 0].Value = “This is a test.”;
worksheet.Cells[2, 0].Value = DateTime.Now.ToString();
// Save the file as ODS
using (var fileStream = new FileStream(fileName, FileMode.Create, FileAccess.Write))
{
workbook.Save(fileStream, SaveOptions.OdsDefault);
}
Console.WriteLine(fileName);
When opening the file generated by LibreOffice Calc, the corrupted file error appears. Error also happens with the file generated by the example on the page
libreoffice version
Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: default; VCL:win
Locale: pt-BR (pt_BR); UI: pt-BR
Calc: CL threaded
GemBox.Spreadsheet Version
49.0.1767