Importing Excel File into Spreadsheet Ontology

If your Excel spreadsheet has a complex layout, the most flexible option for importing it is to have TopBraid Composer convert it into a model that uses the http://www.topbraidcomposer.org/owl/2006/08/spreadsheets.owl ontology, which defines the structure of the spreadsheet with classes such as ss:Cell, ss:Sheet, and ss:Workbook. You can then develop custom SPARQL transformations to extract the data you need from this model and arrange it with a structure that is best suited for your application. (For information on alternative methods for importing spreadsheets into a model, see Importing Spreadsheets: An Overview.)

Select File > Import and then pick Import Excel File into Spreadsheet Ontology. Enter a base URI for the data that will be stored after the spreadsheet is imported, select the Excel file to import, and reset the filename in which the imported data will be saved if the default name (based on the imported file's filename) is not what you want. After you click Finish, TopBraid Composer will create the file.

The following shows the result of converting the TQPeople.xls example file, which has "Dean" as the contents of cell B2:

In addition to the location and contents of each cell, ss:Cell instances have properties that store information about the datatype of the contents, whether the cell was hidden, and other information shown in the spreadsheet.rdf Properties view above. For each sheet, the model stores information about which cells have data, and for each worksheet the model stores information about the sheets that it contains.

To perform this kind of import from a SPARQLMotion script, use the Import Excel cell instances (sml:ImportExcelCellInstances) module.