export - Need Dynamic/ default width for CSV file when EXPORTING through SERVLET -


I am exporting my list to a CSV file through the Servlet. Everything is working fine but I want to set default / dynamic width for cell / column?

Here's my coding. Your quick reply will be helpful ..

Thank you in advance.

  package com.uson.stat.action; Import javax.servlet.ServletException; Import javax.servlet.http.httpServlet; Import javax.servlet.http.HttpServletRequest; Import javax.servlet.http.HttpServletResponse; Import java.io.IOException; Public class export action throws ServletException, HttpServlet {Public Zero doPost (HttpServletRequest req, HttpServletResponse Res) throws, IOException {res.setContentType ("App / CSV"); Res.setHeader ("cache-control", "public"); Res.setHeader ("Pagma", "Public"); Res.setHeader ("content-displacement", "attachment; filename = \" test.csv "+" \ ""); String Content = "Exam Article" + "," + "Viewed on 01-02-2010" + "," + "" Guest "; System.out.println (" Contents> <>> <> < +> Content); Res.getOutputStream () print (content). }}  

will output:

  test article seen on 01-01-2010 Guest  

but output It looks like this:

  Check on guest ArtiViewed Guest  

This is displaying properly in each cell but I'm manually in Excel Need to increase the size. File.

  • Gnaniar Zuber

How can I solve it? >

"How do I set the width of the cell to the dynamic / default size?"

You Can not Do

CSV is just data and nothing else. No color, no fonts, no width, no width nothing.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -