Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells supports converting an Excel file with a table to an ODS file. You simply need to save the file in ODS format, and the generated ODS file will contain a functional table.
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-C++
// Source directory path
U16String sourceDir = u"..\\Data\\01_SourceDirectory\\";
// Output directory path
U16String outputDir = u"..\\Data\\02_OutputDirectory\\";
// Open an existing file that contains a table/list object in it
U16String inputFilePath = sourceDir + u"SampleTable.xlsx";
Workbook workbook(inputFilePath);
// Save the file in ODS format
workbook.Save(outputDir + u"ConvertTableToOds_out.ods");
std::cout << "Conversion to ODS completed successfully!" << std::endl;
Aspose::Cells::Cleanup();
}
The output ODS file generated by the sample code is attached for your reference.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.