You can import an Excel file that has a simple format (either by transforming it to CSV and import as text, or by importing it as an xls file) with no need for a preceding schema file. After importing the file, you could switch to "Grid" mode which is a better approach to the way that the original file is displayed in Excel.
Otherwise, in case you need to customize the format of the imported file, then you should consider creating a custom XSL file.
There are several ways to do this import.1.
You can use either Oxygen XML Editor or Developer to import from Text/Excel to XML(File -> Import -> Text file/MS Excel file...).
Note however that this function has some limitations:
- it can only import the old Excel 97/2000/XP/2003 format.(.xsl)
- it can only import one sheet at a time.
- the table from the sheet is assumed to start from the top left corner(you cannot define the starting and ending row/column of the data to import). If there are other labels, titles or other data before the actual table, the import will get you mixed results.2.
If you have Excel documents in the new format(.xslx), Excel 2007/2010, you could first convert it to the older ".xsl" format - compatibility mode before importing it in oXygen. However, Oxygen also provides a small example XML stylesheet for extracting data directly from the .xslx file. The sample is located in:
This stylesheet will have to be modified to your needs, so some XSLT knowledge is required. The advantage is that after developing this stylesheet you can use it to import automatically in the desired XML format.
There are some video demonstration on our web site about how this could be used:http://www.oxygenxml.com/videos.html#vt ... ocuments_t
Note that the videos are showing extraction from Word and exporting to Excel, but the procedure is the same for extraction/import from Excel.3.
There is an additional method of getting data in Oxygen from Excel. It can be copied directly from Excel to the clipboard and pasted in Oxygen in the Grid mode. Some preparation is required for this.
You have to create in Oxygen an XML file that replicates the structure of the table(same number of columns), switch to Grid mode and paste the copied content from Excel at top left corner from the blank table.
- Code: Select all
You can already name the cell/item elements in any way you want. But the row elements must have the same name(e.g. "row" in this case).