Skip to main content
1-Visitor
October 19, 2015
Solved

Create things from spreadsheet

  • October 19, 2015
  • 6 replies
  • 3480 views

Is it possible to create things from a spreadsheet?  I have about 40 properties for my "things" and I would love to be able to import rather than enter each on in by hand.  Thanks!

    Best answer by CarlesColl

    Export to a csv, and use CSVParser extension ( http://marketplace.thingworx.com/downloads/csv-parser/ ) to do it.

    6 replies

    1-Visitor
    October 19, 2015

    Export to a csv, and use CSVParser extension ( http://marketplace.thingworx.com/downloads/csv-parser/ ) to do it.

    byutz1-VisitorAuthor
    1-Visitor
    October 19, 2015

    Thanks Carles!

    1-Visitor
    October 19, 2015

    Your welcome.

    As it's not documented, when you set ReadCSVFile service parameters on CSVParserFunctions resources, for the parameter "columnMappings" use ";" to separate the different CSV file columns.

    Best Regards,

    Carles.

    byutz1-VisitorAuthor
    1-Visitor
    November 6, 2015

    I achieved creating things from a spreadsheet today.  Here are a couple of notes to help others who may be trying to do it:

    • Create a datashape that contains the properties you want to map to, they need to match the thing_template properties
    • Make sure your csv file columns are in the same order as the datashape above
    • While looping through all of your rows, you will need to create a new infotable each iteration to house whichever row of data you wish to map to the thing, then you can use the setproperties function to add the property values to your newly created things

    If you would like to know some more specifics, please don't hesitate to send me a message.

    1-Visitor
    February 8, 2016

    Hi Brian,

    Can you add a code example for ReadCSV function to read file contain:

    "Value","Data"

    "Value1","Data1"

    "Value1","Data1"


    and show the data in an infotable !


    Thanks