Michel,

General pattern for this is to use SPARQL.

It is hard to reply more specifically without looking at your spreadsheet and I 
do not have time right now to loo at it.

If you are processing a cell with row X, column Y and your row 1 contains names 
of the properties that you will use to create the URIs of the properties, then 
you can always do

?dataCell ss:row ?x
?dataCell ss :column ?y.
?dataCell ss:cellContents ?dataValue
?propertyCell ss:row 1.
?propertyCell ss :column ?y.
?propertyCell ss:cellContents ?propertyValue
FILTER (?x > 1)

Further, if your data is tabular and the first row represents properties, you 
can just double click on the spreadsheet to open. And avoid going through this 
type of import. 

There are different importers for spreadsheets. This white paper may be of use 
https://www.topquadrant.com/download/using-topbraid-to-work-with-spreadsheet-data/?wpdmdl=15930&refresh=5dd36e53b83261574137427
 
<https://www.topquadrant.com/download/using-topbraid-to-work-with-spreadsheet-data/?wpdmdl=15930&refresh=5dd36e53b83261574137427>,
 although it is a bit outdated. 

> On Nov 18, 2019, at 3:35 AM, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
> <[email protected]> wrote:
> 
>  
> More in general: if there are more patterns around for getting the cell 
> contents in some semantics properties for rows/datapoints...that would be 
> very welcome!
>  
> First I thought it would be easy but I am struggling a bit extracting via 
> sparql constructs the row data becoming different instances involving “row-1 
> definitions” just knowing the row and column of a specific cell. Guess I just 
> miss a general pattern walking the rows (as instances f datapoints)  and next 
> the columns (as triples for those instances referencing the first row) ....
>  
> Thx Michel
>  
>  
>  
>  
> Dr. ir. H.M. (Michel) Böhms
> Senior Data Scientist
> 
> T +31888663107
> M +31630381220
> E [email protected] <mailto:[email protected]>    
> Location 
> <https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707>
> 
>  
> <image001.gif> <http://www.tno.nl/>
> This message may contain information that is not intended for you. If you are 
> not the addressee or if this message was sent to you by mistake, you are 
> requested to inform the sender and delete the message. TNO accepts no 
> liability for the content of this e-mail, for the manner in which you use it 
> and for damage of any kind resulting from the risks inherent to the 
> electronic transmission of messages.
>  
>  
>  
>  
> Van: 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
> <[email protected] <mailto:[email protected]>> 
> Verzonden: Sunday, November 17, 2019 2:31 PM
> Aan: [email protected] <mailto:[email protected]>
> Onderwerp: [topbraid-users] contsruct query question for sheets
>  
>  
> PREFIX ss:  <http://www.topbraidcomposer.org/owl/2006/08/spreadsheets.owl# 
> <http://www.topbraidcomposer.org/owl/2006/08/spreadsheets.owl#>>
> PREFIX bsc: <https://w3id.org/def/basicsemantics-owl-complex# 
> <https://w3id.org/def/basicsemantics-owl-complex#>>
> CONSTRUCT {
> ?uri a bsc:PropertyDef .
> }
> WHERE {
>     ?namecell a ss:Cell .
>     ?namecell ss:row 0 .
>     ?namecell ss:cellContents ?name .
> BIND 
> (iri(concat("http://www.topbraidcomposer.org/owl/2006/08/spreadsheets.owl# 
> <http://www.topbraidcomposer.org/owl/2006/08/spreadsheets.owl#>",?name)) AS 
> ?uri )
> }
>  
> Works fine for getting more semantic data after xlsx import like:
> <image002.jpg>
> But if the second and third row are special too like giving (optionally) 
> datatype and unit) how can I best combine?
>  
> Like to have forinstance as result:  ss:shear_modulus bsc:hasUnit Pa
>  
> Is there some smart way to get to the value of row2/3 or can I make a next 
> query that is sequential to this one?
>  
> Thx for advice, Michel
>  
>  
>  
>  
> Dr. ir. H.M. (Michel) Böhms
> Senior Data Scientist
> 
> T +31888663107
> M +31630381220
> E [email protected] <mailto:[email protected]>    
> Location 
> <https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707>
> 
>  
> <image001.gif> <http://www.tno.nl/>
> This message may contain information that is not intended for you. If you are 
> not the addressee or if this message was sent to you by mistake, you are 
> requested to inform the sender and delete the message. TNO accepts no 
> liability for the content of this e-mail, for the manner in which you use it 
> and for damage of any kind resulting from the risks inherent to the 
> electronic transmission of messages.
>  
>  
>  
>  
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/0f3fd26f32ce47ba85ffd41f0abdf41c%40tno.nl
>  
> <https://groups.google.com/d/msgid/topbraid-users/0f3fd26f32ce47ba85ffd41f0abdf41c%40tno.nl?utm_medium=email&utm_source=footer>.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/69b04a966a304fa3bbc21214989e7fd7%40tno.nl
>  
> <https://groups.google.com/d/msgid/topbraid-users/69b04a966a304fa3bbc21214989e7fd7%40tno.nl?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/074839FD-76A8-4355-B793-6257779CB2DA%40topquadrant.com.
  • [topbraid-users] contsruct... 'Bohms, H.M. (Michel)' via TopBraid Suite Users
    • [topbraid-users] RE: ... 'Bohms, H.M. (Michel)' via TopBraid Suite Users
      • Re: [topbraid-use... Irene Polikoff
        • RE: [topbraid... 'Bohms, H.M. (Michel)' via TopBraid Suite Users
          • Re: [topb... Richard Cyganiak
            • RE: ... 'Bohms, H.M. (Michel)' via TopBraid Suite Users
            • RE: ... 'Bohms, H.M. (Michel)' via TopBraid Suite Users
              • ... Richard Cyganiak
                • ... 'Bohms, H.M. (Michel)' via TopBraid Suite Users
                • ... Richard Cyganiak
                • ... 'Bohms, H.M. (Michel)' via TopBraid Suite Users
                • ... Tim Smith
                • ... Irene Polikoff

Reply via email to