cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Create things from spreadsheet

byutz
1-Newbie

Create things from spreadsheet

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!

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

6 REPLIES 6

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

Thanks Carles!

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.

Tmetcalf
Emeritus
(To:byutz)

Hi Brian,

Looks like carlesc​ answer has you up and running - great!

Would you please click the "Correct Answer" button within his answer?  This way the rest of the Community knows the solution too.

Have a great day and thank you for the answer Carles.

Best,

Toby

byutz
1-Newbie
(To:byutz)

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.

mkamal
3-Visitor
(To:byutz)

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

Top Tags