arogachev / yii2-excel

ActiveRecord import and export based on PHPExcel for Yii 2 framework
Other
65 stars 25 forks source link

when I import, throw this exception #15

Closed pavlelee closed 8 years ago

pavlelee commented 9 years ago

Model label must be declared before attribute names or values

arogachev commented 9 years ago

Please show your Excel file content and config.

pavlelee commented 9 years ago

as same as your config, model is creat by myself

arogachev commented 9 years ago

If you use your own model, the config can't be the same. You need adjust it according to your model features. Please show Excel file so I can advice on how to correct it.

pavlelee commented 9 years ago

image this is my model

image

pavlelee commented 9 years ago

this is my config

image

pavlelee commented 9 years ago

can you look this bug??

arogachev commented 9 years ago

You just copied it from README. It's mentioned only for example. You need to correct it according to your model. Also check cell formatting. Could you provide an example of what you want to import?

pavlelee commented 9 years ago

image I want import this

pavlelee commented 9 years ago

can you help me?

arogachev commented 8 years ago

You need to specify standard model label (it's written in bold font by default), also formatting for attribute names is missing (by default it should be written in italics font) See examples in README.