Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cell "A1". Attribute not exist. #28

Open
wangdaguo opened this issue Mar 10, 2016 · 2 comments
Open

cell "A1". Attribute not exist. #28

wangdaguo opened this issue Mar 10, 2016 · 2 comments

Comments

@wangdaguo
Copy link

Error when preparing data for import: sheet "data", cell "A1". Attribute not exist.

@1Luc1
Copy link

1Luc1 commented Aug 15, 2017

i also got the error: Error when preparing data for import: sheet "Tabelle1", cell "A1". Attribute not exist.

i have an model person
with the attributes: id, forename, surname, birthday and country_id.

my excel looks like this

unbenannt

So whats the problem here?

@1Luc1
Copy link

1Luc1 commented Aug 15, 2017

ok i found the "problem". by default the standardModelsConfig useAttributeLabels is set to true. So i changed this, since i have different labels; and now it works

$importer = new Importer([
    'filePath' => Yii::getAlias('@frontend/test.xlsx'),
    'standardModelsConfig' => [
        [
            'className' => Person::className(),
            'useAttributeLabels' => false,

        ],
    ],
]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants