Hi everyone! I am showing an excel sheet which user can open/save in browser. I am not using POI and doing it plainly by setting content type to excel. The problem is data in some cells does not fit in defalut size and user has to widen the cell manually to see the data properly. Whats the way to avoid it ? Can defalut cell size be increased ? or can i format cellc width as per the data size. I dont want ot use any extra things like XSL. please help,
If you're outputting as CSV it's not possible. If you're outputting as SLK it is possible. SLK quickly gets very very ugly though. This is one example...
Don't ask me exactly what everything does. One person here figured it out and he's dead without documenting it properly (he died suddenly last year). We're just changing things as needed and hoping more or less... I put in replace(',','.') because the data is formatted with a comma as decimal separator where Excel expects a period for numeric values. Mind that this is output using a Servlet not a JSP so the string is pushed into the ServletOutputStream
Where sheet contains the result from the function. The List that goes into the function contains a series of Maps, one per row of data. I devices that system to pass tabular data around our webapp as it's convenient not only for internal use but also to output using JSP tags (JSTL or our own tabular data tag). [ January 23, 2004: Message edited by: Jeroen Wenting ]