Kompatibilitätsprüfer in Excel mit C++ deaktivieren

Deaktivieren des Kompatibilitätsprüfers in Excel-Arbeitsblättern in C++

Wie Sie den Kompatibilitätsprüfer in Microsoft Excel deaktivieren

Um den Kompatibilitätsprüfer in Microsoft Excel zu deaktivieren (z.B. Microsoft Excel 2007/2010):

  • (Excel 2007) Klicken Sie auf die Office-Schaltfläche, dann auf Vorbereiten, anschließend auf Kompatibilitätsprüfung ausführen und deaktivieren Sie die Option Kompatibilität beim Speichern dieser Arbeitsmappe prüfen.
  • (Excel 2010) Klicken Sie auf die Registerkarte Datei, dann auf Info, klicken Sie auf Nach Problemen suchen, klicken Sie auf Kompatibilität prüfen und deaktivieren Sie anschließend die Option Kompatibilität prüfen, wenn Sie diese Arbeitsmappe speichern.

So deaktivieren Sie den Kompatibilitätsprüfer mithilfe von Aspose.Cells-APIs

Setzen Sie die Workbook.GetCheckCompatibility()-Eigenschaft auf False, um den Kompatibilitätsprüfer von Microsoft Excel zu deaktivieren.

Codebeispiele

Die folgenden Codebeispiele zeigen, wie man den Kompatibilitätsprüfer mit Aspose.Cells for C++ deaktiviert.

#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

    // Path to the documents directory.
    U16String srcDir(u"..\\Data\\01_SourceDirectory\\");

    // Open a template file
    U16String templateFilePath = srcDir + u"sample.xlsx";
    Workbook workbook(templateFilePath);

    // Disable the compatibility checker
    workbook.GetSettings().SetCheckCompatibility(false);

    // Path to save the output file
    U16String outputFilePath = srcDir + u"Output_BK_CompCheck.out.xlsx";

    // Saving the Excel file
    workbook.Save(outputFilePath);

    std::cout << "Excel file saved successfully!" << std::endl;

    Aspose::Cells::Cleanup();
    return 0;
}