I have a Servlet and JSP page.

I invoke a method with form submit and the method is a java method.

response.setHeader("Content-Disposition", "attachment; filename = report.XLS");
		response.setContentType("application/vnd.ms-excel");
		response.getWriter().write(result);
		response.getWriter().flush();

Everything works fine but it tries to fit the columns in 1 page. So i have a long adress information.

The adress information is like this in the report.

XESSA IS TRYING
TO LEARN EXCEL


I want to see it like this in the report.

XESSA IS TRYING TO LEARN EXCEL.

I want it to have always 1 row length even it is as long as a novel.

> I want it to have always 1 row length even it is as long as a novel.

AFAIK, you can't, at least not unless you are using some excel manipulation API like POI.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.