Skip to Content
author's profile photo Former Member
Former Member

Power Designer 16.5.5 Import Model from Excel issue

SAP Power Designer 16.5 SP05 PL02 (64-bit) Version 16.5.5.2 (4734) I am trying to import a model using Excel. I am getting the following error: "Object creation can only be done through composition collections (0x80020009) at line 4722, character 4". After I select ok I am prompted if I want to fix the script. I select yes, then the Extension Properties Dialogue box opens with the Method Script tab selected. Below is the script contained within. I never get prompted by the Wizard to select the excel file to use for model creation. Any help on this is greatly appreciated.

Sub %Method%(obj)

' Create new object Dim import

set import = obj.ExtendedObjects.CreateNew()

if not import is nothing then

import.Stereotype = "ExcelImport"

' Launch import

import.ExecuteCustomMethod "%CurrentTargetCode%.Import"

' Detect error

If import.GetExtendedAttribute( "%CurrentTargetCode%.DataSourcePersist") = "" then

import.Delete

End If set import = nothing

End If

End Sub

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jul 11, 2016 at 11:07 PM

    The code does not have issue.

    The problem is that your source object map to wrong target.

    Please check before the error, how do you map the object.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 26, 2016 at 03:05 PM

    Hi Philip,

    When I select File > Import > Excel the New Model screen opens. I select the Logical Model from within the Model Type. When I select OK, that is when I receive the error. What should happen is the dialogue box that enables me to select the source Excel file should open so that I can browse to it. Im not sure what you mean by "source object map to wrong target" Can you elaborate on what you mean?

    Thank you,

    Jessie

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.