تحويل دفتر عمل Excel إلى Ods و Sxc و Fods (OpenOffice / LibreOffice calc) باستخدام C++

حول OpenDocument

تنسيق OpenDocument (ODF) هو تنسيق ملف مجاني ومفتوح للوثائق المكتبية الإلكترونية الذي طوّره الأصل لـ OpenOffice suite. تنسيق الجدول الخلية OpenDocument (ODS) هو تنسيق الملفات لوثائق Excel. حاليًا يُعتبر OpenDocument معيارًا لـ OASIS و ISO.

تحويل Ods (OpenOffice / LibreOffice calc) إلى Excel

يدعم Aspose.Cells تحميل ملفات Ods و Sxc و Fods المدعومة من قبل OpenOffice / LibreOffice Calc، وتحويل Ods و Sxc و Fods إلى ملفات Excel.

#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

    // Load your source ods file
    U16String odsFilePath(u"book1.ods");
    std::shared_ptr<Workbook> workbook = std::make_shared<Workbook>(odsFilePath);

    // Save as xlsx file
    U16String xlsxOutputPath(u"ods_out.xlsx");
    workbook->Save(xlsxOutputPath);

    // Load your source sxc file
    U16String sxcFilePath(u"book1.sxc");
    workbook = std::make_shared<Workbook>(sxcFilePath);

    // Save as xls file
    U16String xlsOutputPath(u"sxc_out.xls");
    workbook->Save(xlsOutputPath);

    // Load your source fods file
    U16String fodsFilePath(u"book1.fods");
    workbook = std::make_shared<Workbook>(fodsFilePath);

    // Save as xlsb file
    U16String xlsbOutputPath(u"fods_out.xlsb");
    workbook->Save(xlsbOutputPath);

    std::cout << "Files converted successfully!" << std::endl;

    Aspose::Cells::Cleanup();
}

تحويل Excel إلى Ods (OpenOffice / LibreOffice Calc)

يدعم Aspose.Cells تحويل ملفات Excel إلى ملفات Ods و Sxc و Fods. يوضح المثال البرمجي أدناه كيفية تحويل القالب إلى ملفات Ods و Sxc و Fods.

#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

    // Load your source workbook
    Workbook workbook(u"book1.xlsx");

    // Save as ods file 
    workbook.Save(u"Out.ods");

    // Save as sxc file 
    workbook.Save(u"Out.sxc");

    // Save as fods file 
    workbook.Save(u"Out.fods");

    std::cout << "Files saved successfully!" << std::endl;

    Aspose::Cells::Cleanup();
}

مواضيع متقدمة