cancel
Showing results for 
Search instead for 
Did you mean: 

Download to excel between two given dates

dhruv_shah3
Active Contributor
0 Kudos

Hi All,

I already implemented Export to Excel funtionality in webdynpro java. Now i have a requirement to download the data to Excel only between two given dates.

I am taking two dates from the user and based on that it should download data into excel file.

Guide me on this or send pseudocode for this.

Regards,

Dhruv

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

Can you mention the backend, I mean where data is coming from?

Regards

LN

dhruv_shah3
Active Contributor
0 Kudos

Hi,

I am using R/3.as a backend

Former Member
0 Kudos

Hi,

If I understand your question correctly,

you are gettting some data from R/3. You need to filter out that data which is in between two given dates , export that data to excel.

If yes, then take one more ValueNode with same structure.

and bind the filtered data to this node.

To filter out model node, use

int size=wdContext.node<outputnode>().size();

Date stDate=wdContext.currentContextElement().get<startDate>();

Date endDate=wdContext.currentContextElement().get<endDate>();

for(int i=0;i<size;i++)

{

Date objDate=wdContext.node<outputNode>().get<outputNode>ElementAt(i).get<dateAttribute>();

if( (objDate.compareTo(stDate)>=0) && (objDate.compareTo(endDate)<=0) )

{

// Create element for value Node , set the values (ie. i'th record values) and add to ValueNode.

}

}

Long process, but you can use

Now export the ValueNode to excel

Regards

LN

Edited by: Lakshmi Narayana Chowdary Namala on Sep 22, 2008 12:04 PM

Answers (0)