XML を Excel ブックにインポートする
Contents
[
Hide
]
Aspose.Cells を使用すると、ワークブック内に XML マップをインポートできます。Workbook.ImportXml()方法。次の手順で、Microsoft Excel を使用して XML マップをインポートできます。
- 選択するデベロッパータブ
- クリック輸入XML セクションで、必要な手順に従います。
インポートを完了するには、XML データを提供する必要があります。がここにありますサンプル XML データテストに使用できます。
Microsoft Excel を使用して XML マップをインポートする
次のスクリーンショットは、Microsoft Excel を使用して XML マップをインポートする方法を示しています。
![]() |
---|
Aspose.Cells を使用して XML マップをインポートする
次のサンプル コードは、Workbook.ImportXml() .それは、出力エクセルファイルこのスクリーンショットに示すように。
![]() |
---|
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 | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
// Create a workbook | |
Workbook workbook = new Workbook(); | |
// URL that contains your XML data for mapping | |
string XML = "http://www.aspose.com/docs/download/attachments/434475650/sampleXML.txt"; | |
// Import your XML Map data starting from cell A1 | |
workbook.ImportXml(XML, "Sheet1", 0, 0); | |
// Save workbook | |
workbook.Save(dataDir + "output_out.xlsx"); |