CGridview and phpexcel

Hi ClaCS,

Thank you for your solutions. This is very nice code and save my time. but I’ve an another issues.

  1. how to report the relationship data. e.g. I keep users.id in my project tbl as user_id. Now, the report exported the project.user_id only. I want to export the username at report. How can I?

  2. and some of the tbl’s field keep the data by csv or jason code. For those fields are relationship with other tables. how could I export the really data from relative tbl at report.

Regards

Thu Ra

Nice solution ClaCS! Thanks a lot.

Good Job

Hello,

Did u find any solution for this problem ??

I am also facing the same.why xls contain xml data ??

like :

<Table>

<Row>

<Cell><Data ss:Type="String">No</Data></Cell>

<Cell><Data ss:Type="String">User Id</Data></Cell>

<Cell><Data ss:Type="String">User Name</Data></Cell>

<Cell><Data ss:Type="String">User Alias</Data></Cell>

<Cell><Data ss:Type="String">User Password</Data></Cell>

<Cell><Data ss:Type="String">Role Description</Data></Cell>

<Cell><Data ss:Type="String">User Status</Data></Cell>

<Cell><Data ss:Type="String">Date Created</Data></Cell>

<Cell><Data ss:Type="String">Last Updated date</Data></Cell>

</Row>

<Row>

<Cell><Data ss:Type="String">1</Data></Cell>

<Cell><Data ss:Type="String">1</Data></Cell>

<Cell><Data ss:Type="String">januar</Data></Cell>

<Cell><Data ss:Type="String">ID - xxxx - xxxx</Data></Cell>

<Cell><Data ss:Type="String">xxxxxxxx</Data></Cell>

thank you.

How can u set the width for each column using this extension?

Hi Sir,
Your code is excellent. But i have an help with you. how can add relation data to this excel file when exporting?
for example; I stored a staff_id on table and it have a relation on this model. how can i convert this staff_id in to his name using this relation.

Is this possible ?

Hi. Have you seen my tutorial? I did something similar few years ago.
https://www.yiiframework.com/wiki/462/yii-for-beginners-2
… search for “excel” word