Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Download the UserList Data into Excel Sheet


i want to download the userlist data into excel sheet

i have written the code of

getting the userlist as

IUserFactory userfactory = UMFactory.getUserFactory();

IUserSearchFilter userfltr = userfactory.getUserSearchFilter();


ISearchResult userResult = userfactory.searchUsers(userfltr);

int size = userResult.size();

response.write("<table><tr><td bgcolor=Green>"+ "Names of the user are:"+ "</td></tr></table>\n");

while (userResult.hasNext())


response.write("<table border=0>\n");

String uniqueid = (String);

IUser user = userfactory.getUser(uniqueid);

//response.write("<tr><td>"+ user.getDisplayName()+ "</td></tr>\n " + "<tr><td>"+ user.getUniqueID() + "</td></tr>\n");

response.write("<tr><td>"+ user.getDisplayName() + user.getUniqueID() + "</td></tr>\n");

//response.write("<tr><td>"+ user.getUniqueID() + "</td></tr>\n");



response.write("<table border=0><tr><td bgcolor=Green>" + " Total no of users "+ "</td></tr>\n");

response.write("<tr><td bgcolor=Red>"+ size+ "</td></tr></table>\n");

and then a separate code for downloading the data in excel sheet

HttpServletResponse res = request.getServletResponse(true);

try {



} catch (Exception e) {



but my requirement is the list of users should come in the excel sheet

can anyone help me with how do i insert the userlist data into the excl sheet

Can anyone help me

Useful answers will be rewarded



Former Member
Not what you were looking for? View more on this topic or Ask a question