Skip to Content
0
Former Member
Mar 19, 2008 at 12:05 PM

Dynamically generate the Column header

111 Views

Hi friends,

I am using Binary Cache method for Export to Excel. I am using a separate method for generating the column headers. My question is : Is there a way to put the attribute names from the node directly instead of the one I am currently using.

public java.util.Map getOrderColumnInfos( )

{

//@@begin getOrderColumnInfos()

// Returns Header for the Table to be passed on to method toExcel()

Map columnInfosMap = new LinkedHashMap();

columnInfosMap.put(

IPrivateABC.ISearchResultstoExcelElement.ATTRIBUTE1,

"Name");

columnInfosMap.put(

IPrivateABCSearchResultstoExcelElement.ATTRIBUTE2,

"Reference");

columnInfosMap.put(

IPrivateABC.ISearchResultstoExcelElement.ATTRIBUTE3,

"Created By");

columnInfosMap.put(

IPrivateABC.ISearchResultstoExcelElement.ATTRIBUTE4,

"Input Date");

return columnInfosMap;

//@@end

}

Instead of putting the header texts, I want the attribute names to be displayed on the Excel file headers. Please let me know if this is possible.