Skip to Content
0

Script to import excel sheet as data item in Power Designer

Apr 12 at 05:38 AM

45

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

George McGeachie Apr 12 at 08:15 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
Catherine Wreyford Apr 12 at 09:56 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0