Book a Demo

Author Topic: Automate an import from a spreadsheet  (Read 5492 times)

james.fitzjohn

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Automate an import from a spreadsheet
« on: June 21, 2018, 08:08:25 pm »
Hello all,

I want to be able to update EA from our "CMDB" spreadsheet, I have created a CSV import specification and it works fine however other people will be adding to the CMDB spreadsheet as changes in the environment  are made so I would like to schedule the import to run once per day.

How would I do this? and how would I ensure i dont have multiple copies of the same server imported each day.

Thanks

James

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Automate an import from a spreadsheet
« Reply #1 on: June 21, 2018, 08:13:18 pm »
There's a VB and a Jxxx script to import csv comming with the EAScriptLib MDG. You can modify that to your needs and have it run on a regular basis. You will need a normal workstation and a logged on user since EA can not run as a service (or at least it's a PITA trying to do that; check LieberLieber which have a paper for that).

q.

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 344
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Re: Automate an import from a spreadsheet
« Reply #2 on: June 28, 2018, 06:48:22 am »

How would I do this? and how would I ensure i dont have multiple copies of the same server imported each day.


You have to add in the spreadsheet a column in order to store the GUID of the element in EA. So, it is better if you store this GUID in your CMDB in order the spreadsheet be well generated.

Your script have to find the element by GUID and then refresh the data. If no GUID in the spreadsheet create the element and then upload the GUID (to spreadsheet or CMDB).

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Automate an import from a spreadsheet
« Reply #3 on: June 29, 2018, 09:39:47 am »
When cases where we've had limitations to maintain EA GUID in the other tools, we've added the Unique identifier from the other tool (CMDB in your case) into EA as a tagged value, and have done the lookup up based on that (slightly performance intensive, but is an option)

(If you have the flexibility to do some excel gimmicks, a vlookup could also give you a import worksheet).

Rich Anderson

  • EA User
  • **
  • Posts: 142
  • Karma: +8/-0
    • View Profile
    • LinkedIn
Re: Automate an import from a spreadsheet
« Reply #4 on: July 03, 2018, 05:09:36 pm »
When dealing with spreadsheets and interchanging data with EA, I find the best way is to just read (and write) the spreadsheet directly using the Excel API and then do the same to EA using the EA API.   I use Visual Studio with VB.Net (or you could use C#).   Once you get the hang of doing this, you should find that you can handle almost any situation pretty easily because your code can be set up to handle all the different exceptions.   
Rich Anderson
Urgnt Limited