It appears I sent the wrong files.  Try these instead.

Also, to run this, create a project named tqexamples.com and copy the files into that.

-- Scott

On 3/11/10 12:06 PM, Gerrick Bivins wrote:
Scott,
The script doesn't have an export module in it(see attached view of the canvas).
Gerrick

On Thu, Mar 11, 2010 at 10:54 AM, Scott Henninger <shennin...@topquadrant.com> wrote:
Gerrick; Attached is an example script that reads in an Excel file, adds data, and writes back to the Excel file.  The example Excel file is also included.

-- Scott

On 3/9/10 2:31 AM, Gerrick Bivins wrote:
Hello,
I am importing an ontology from a table creating some instances of classes in that ontology and then exporting the information back out to xls.
The file looked ok in TBC but when opened the file in excel I noticed that each class (sheet) has the property row repeated (0,1) ie:
Row0: name    | email                          |  phone
Row1: name    | email                          |  phone
Row2: Gerrick | gbivi...@gmail.com    |  555-123-4567
Row3: John     | johnsm...@gmail.com |  555-456-7890
...
Any idea why I would see something like this?

My sparqlmotion script is doing the following:
1)import spreadsheet ontology
2)import owl model to translate into spreadsheet ontology
3)apply construct query to create instances of classes in the spreadsheet ontology from the owl model
4)export to xls
Gerrick
--
You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group.
To post to this group, send email to topbraid-composer-users@googlegroups.com.
To unsubscribe from this group, send email to topbraid-composer-users+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/topbraid-composer-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group.
To post to this group, send email to topbraid-composer-users@googlegroups.com.
To unsubscribe from this group, send email to topbraid-composer-users+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/topbraid-composer-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group.
To post to this group, send email to topbraid-composer-users@googlegroups.com.
To unsubscribe from this group, send email to topbraid-composer-users+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/topbraid-composer-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group.
To post to this group, send email to topbraid-composer-us...@googlegroups.com.
To unsubscribe from this group, send email to topbraid-composer-users+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/topbraid-composer-users?hl=en.
# Saved by TopBraid on Thu Mar 11 12:17:38 CST 2010
# baseURI: http://support.tq.com/RoundTripExcel
# imports: http://topbraid.org/sparqlmotionfunctions
# imports: http://topbraid.org/sparqlmotionlib

@prefix :        <http://support.tq.com/RoundTripExcel#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix personinfo:  <file:///tqexamples.com/PersonInfo.xls#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sm:      <http://topbraid.org/sparqlmotion#> .
@prefix smf:     <http://topbraid.org/sparqlmotionfunctions#> .
@prefix sml:     <http://topbraid.org/sparqlmotionlib#> .
@prefix sp:      <http://spinrdf.org/sp#> .
@prefix spin:    <http://spinrdf.org/spin#> .
@prefix tables:  <http://topbraid.org/tables#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .

<http://support.tq.com/RoundTripExcel>
      rdf:type owl:Ontology ;
      owl:imports <http://topbraid.org/sparqlmotionfunctions> , 
<http://topbraid.org/sparqlmotionlib> ;
      owl:versionInfo "Created with TopBraid Composer"^^xsd:string .

:ApplyConstruct_1
      rdf:type sml:ApplyConstruct ;
      sm:next :ExportToRDFFile_1 ;
      sm:nodeX 241 ;
      sm:nodeY 195 ;
      sml:constructQuery
              [ rdf:type sp:Construct ;
                sp:templates ([ sp:object personinfo:People ;
                            sp:predicate rdf:type ;
                            sp:subject _:b1
                          ] [ sp:object "Scott" ;
                            sp:predicate personinfo:firstName ;
                            sp:subject _:b1
                          ] [ sp:object "Henninger" ;
                            sp:predicate personinfo:lastName ;
                            sp:subject _:b1
                          ] [ sp:object "2010-10-05" ;
                            sp:predicate personinfo:birthdate ;
                            sp:subject _:b1
                          ] [ sp:object -1 ;
                            sp:predicate personinfo:age ;
                            sp:subject _:b1
                          ]) ;
                sp:where ([ rdf:type sp:Let ;
                            sp:expression
                                    [ rdf:type smf:buildURI ;
                                      sp:arg1 "{?fileURI}#me"
                                    ] ;
                            sp:variable _:b1
                          ])
              ] ;
      sml:replace "false"^^xsd:boolean .

:ExportToRDFFile_1
      rdf:type sml:ExportToRDFFile ;
      sm:nodeX 254 ;
      sm:nodeY 318 ;
      sml:baseURI "file:///tqexamples.com/PersonInfo.xls"^^xsd:string ;
      sml:targetFilePath "PersonInfo.xls"^^xsd:string .

<http://support.tq.com/RoundTripExcel#Import-PersonInfo.xls_2>
      rdf:type sml:ImportRDFFromWorkspace ;
      rdfs:label "Import PersonInfo.xls"^^xsd:string ;
      sm:next :ApplyConstruct_1 ;
      sml:baseURI "file:///tqexamples.com/PersonInfo.xls"^^xsd:string .

_:b1  sp:varName "me"^^xsd:string .

Attachment: PersonInfo.xls
Description: MS-Excel spreadsheet

Reply via email to