SectionMode

XlsxSaveOptions.SectionMode property

Ruft ab oder legt fest, wie Abschnitte beim Speichern im XLSX-Ausgabedokument behandelt werden. Der Standardwert istMultipleWorksheets .

public XlsxSectionMode SectionMode { get; set; }

Beispiele

Zeigt, wie Dokumente als separate Arbeitsblätter gespeichert werden.

Document doc = new Document(MyDir + "Big document.docx");

// Jeder Abschnitt eines Dokuments wird als separates Arbeitsblatt erstellt.
// Verwenden Sie „SingleWorksheet“, um alle Dokumente auf einem Arbeitsblatt anzuzeigen.
XlsxSaveOptions xlsxSaveOptions = new XlsxSaveOptions();
xlsxSaveOptions.SectionMode = XlsxSectionMode.MultipleWorksheets;

doc.Save(ArtifactsDir + "XlsxSaveOptions.SelectionMode.xlsx", xlsxSaveOptions);

Siehe auch