cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with export to excel functionality

Former Member
0 Kudos

Hi All,

I am working with export to excel functionality.

I have created level based reports which displays dynamic table in each level by clicking on link to action.

Each level has dynamic table and export to excel functionality which exports the data from the table to excel sheet.

Issue: At first time click

After the 1st level is rendered without clicking on export to excel, moving to 2nd level. Now in 2nd level I am clicking on export to excel which exports the data of the 2nd level correctly in the excel sheet.

Now coming back to 1st level and if i click on export to excel, it is exporting the 2nd level data to the excel sheet which is absolutely wrong. It has to export the 1st level data.

But after rendering the 1st level if i click on export to excel in 1st level it is working fine . Then if u move to 2nd level and click on export to excel it is also working fine.

The problem occurs when you go to 2nd level export to excel then coming back to 1 st level export to excel.

What could be the reason for this issue?

I am using JXL API and everything is dynamic.

This is very urgent.

Please suggest.

Regards,

Subashini.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Which version of IE are you using?

Clearing your IE cache and try the same steps, if it works

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

Thanks for your reply. IE version is 6.0. After clearing the CACHE also it is giving the same error.

I have called the expor to excel method in the init which means it will be executed only once. But I have to navigate through various levels and click on expor to excel. But init method is executed only once. Is this the problem?

Regards,

Subashini

Former Member
0 Kudos

Hi,

Init will be called only once

If you want to execute your code multiple times

create a context attribute of type boolean and check this value in the wdDomodify do the respective coding

Ex:

if(wdContext.currentContextElement().isExcelFilterNeeded)

/// Your code from the init goes here

Dont forget to set the value to the context attribute isExcelFilterNeeded.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

Thanks for your replies. Where do I write this if condition?

In modify view or init method itself?

in init method i ve the following code:

Setting the input values for bapi for each level and executing the bapi in the init method itself.

if(reportLevel==1){

toExcel(param value);

}

if(reportLevel==2){

toExcel(param value);

}

Pls explain.

Regards,

Subashini.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

My issue got resolved. We need to specify different excel file name for different levels.

Thanks for replies.

Regards,

Subashini.