Speichern Sie die Arbeitsmappe im strikt offenen XML-Tabellenformat
Contents
[
Hide
]
Mögliche Nutzungsszenarien
Aspose.Cells ermöglicht Ihnen das Speichern der Arbeitsmappe inStrikte offene XML-TabelleFormat. Dafür stellt sie die**Workbook.Settings.Compliance**Eigentum. Wenn Sie seinen Wert als festlegen**OoxmlCompliance.Iso29500_2008_Strict**, dann wird die Excel-Ausgabedatei im Strict Open XML Spreadsheet-Format gespeichert.
Speichern Sie die Arbeitsmappe im strikt offenen XML-Tabellenformat
Der folgende Beispielcode erstellt eine Arbeitsmappe und legt den Wert von fest**Workbook.Settings.Compliance** Eigentum als**OoxmlCompliance.Iso29500_2008_Strict** und speichert es alsExcel-Datei ausgeben . Wenn Sie die Excel-Ausgabedatei in Microsoft Excel öffnen und das Dialogfeld Speichern unter… öffnen, sehen Sie ihr Format als*Strikte offene XML-Tabelle*wie in diesem Screenshot gezeigt.
Beispielcode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Create workbook. | |
Workbook wb = new Workbook(); | |
// Specify - Strict Open XML Spreadsheet - Format. | |
wb.Settings.Compliance = OoxmlCompliance.Iso29500_2008_Strict; | |
// Add message in cell B4 of first worksheet. | |
Cell b4 = wb.Worksheets[0].Cells["B4"]; | |
b4.PutValue("This Excel file has Strict Open XML Spreadsheet format."); | |
// Save to output Excel file. | |
wb.Save("outputSaveWorkbookToStrictOpenXMLSpreadsheetFormat.xlsx", SaveFormat.Xlsx); |