Gibt es eine Möglichkeit, Word-Dokument zu konvertieren, wo ich einige Tabellen in Excel-Datei habe? Es wäre sehr hilfreich, Tabellen zu konvertieren.Konvertieren von Word DOCX zu Excel mit OpenXML
So etwas:
- öffnen Word-Dokument OpenXML mit
- Alle Tabellen XML-Tags
- Copy xml-Tags
- erstellen Excel
- Insert XML-Tags mit Tabellendatei von Word zu neuer Excel-Datei
ich meine
void OpenWordDoc(string filePath)
{
_documentWord = SpreadsheetDocument.Open(filePath, true);
}
List<string> GetAllTablesXMLTags()
{
//find and copy
}
List<string> CreateExcelFile(string filePath)
{
TemplateExcelDocument excelDocument = new TemplateExcelDocument();
_documentExcel = excelDocument.CreatePackage(filePath);
}
void InsertXmlTagsToExcelFile(string filePath)
{
CreateExcelFiles(filePath);
var xmlTable = GetAllTablesXMLTags();
// ... insert to _documentExcel
}
Leider brauche ich ähnliche Funktion, aber mit OpenXML –