The gist is to:
- Get a list of all records you need to export from the celltable on the client browser (and the sorting information).
- Return this to the server.
- Fetch all the information from (1).
- Build into an Excel or CSV output using POI or similar.
In reality it can be quite a pain. I implemented it in ExtJs grids using POI and had to have columns in any order user had rearranged them to, columns shown/hidden if user had changed them, numeric values as numeric type in exported Excel file... etc. You probably want to try to use a library to achieve this rather than write it yourself.
Note that the library uses HTML output, which is a hack (that even ASP.Net recommends... LOL). You'll get a warning if you open a HTML table in Excel that it is not the proper format, but then Excel will load it anyway. If you need rich, native Excel exports, you'll probably need to write your own POI framework.
This topic was covered earlier here: https://groups.google.com/forum/#!msg/google-web-toolkit/I9VEaFlkA1I/pDXGBBD2g_AJ
Sincerely,
Joseph
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/PfRTT2iTGgkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment