cancel
Showing results for 
Search instead for 
Did you mean: 

How do you print contents of a table?

Former Member
0 Kudos

Is there a way to print the contents of a table from web dynpro? Any help with this is appreciated! Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

SRudra
Contributor
0 Kudos

Hi,

I am sure u can iterate thru the node context and get values from the attributes... Let us know if that helps.

Cheers!!!

Former Member
0 Kudos

I have tried following this tutorial to export the data to excel:<a href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/webDynproJava-ExportingTableDataUsingOn-DemandStreams-SAPNW+7.0&">Exporting Table Data Using On-Demand Streams</a>.

But when I attempt to open the excel file as an XML list, I get an error "The specified XML source does not refer to a schema. Excel will create a schema based on the XML source data." Nothing shows up then.

Any ideas about this? I am using excel 2003.

former_member485701
Active Participant
0 Kudos

Hi,

You can print all values of the table there it self.

Following is the code for this:

int size= wdContext.nodeTable().size();

Iterator iter = wdContext.nodeTable().getNodeInfo().iterateAttributes();

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

IWDNodeElement element = wdContext.nodeTable().getElementAt(i);

while (iter.hasNext()) {

IWDAttributeInfo elem = (IWDAttributeInfo) iter.next();

wdComponentAPI.getMessageManager().reportSuccess(elem.getName()"="element.getAttributeValue(elem.getName()));

}

}

Regards,

Praveen