cancel
Showing results for 
Search instead for 
Did you mean: 

Script to import excel sheet as data item in Power Designer

0 Kudos

Hi

Has anyone written a script to import an excel worksheet as a data item within power designer - using extended attributes. Am trying to do so but no idea where to even start.

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi, thanks for the suggestion - I can do the manual import without an issue - but I need to automate the process in the longer term, hence the attempt at creating a script that I can call which would do the exact same thing as what one would do manually.

GeorgeMcGeachie
Active Contributor
0 Kudos

If you want your script to re-import an existing Excel Import in a model, it could call the Import method on the Excel Import object.

If you have a standard set of Data Items that you want to include in multiple models, you could use a script to run a Model merge, using the Merge method on the model object.

There aren't any Excel import scripts in the samples supplied by SAP, but take a look at this thread: -

https://answers.sap.com/questions/417299/mapping-vb-script-error-object-required-0x800a01a8.html

GeorgeMcGeachie
Active Contributor
0 Kudos

You don't need to write a script, the standard Excel import extension will import Data items, including extended attributes. Take a look at this video -

https://www.youtube.com/watch?v=JoAkFVrWKzE

It's a few years old, but still relevant.

GeorgeMcGeachie
Active Contributor
0 Kudos

The video shows you how to import into a new model. To import Data Items into an existing model, start the wizard in a slightly different way:

  • attach the Excel Import model extension to your model (in the Help, see Core Features Guide > Modeling with PowerDesigner > Customizing Your Modeling Environment > PowerDesigner Resource Files > Extension Files > Attaching Extensions to a Model)
  • right-click a blank area of a diagram (or the model name in the Browser), and select "Import Excel File"

You can also read about the Excel import wizard in the PowerDesigner Help:

Core Features Guide > Modeling with PowerDesigner > Objects > Importing Objects from Excel Files