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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Create things from spreadsheet

byutz
12-Amethyst

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!

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.

byutz
12-Amethyst
(To:CarlesColl)

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
12-Amethyst
(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-Newcomer
(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

Announcements


Top Tags