There is a very simple way of doing it. Just use a serv�et to generate a dynamic page with only the <table> section, but setting the content/type to "application/vnd.ms-excel". The browser will open Excel to show the contents.
Make sure you call that servlet from the popup window ;-) On 5/6/05, Sunil Tiwari <[EMAIL PROTECTED]> wrote: > Hi, > Thanx Sean for ur help. > I tried using POI for ecel stuff but thats not the way i want it. > The thing is that home page of my application displays some rows of data > from database using <x:datatable> > I want to put a link at the bottom of the home page (See In Excel) which > will open a pop up window and display the table values > in excel sheet. I should also be able to save the opened excel sheet. > Is there any way to directly use the data from the datatable and show it > using Excel? > > Cld anyone provide sample code for it? > > Thanx in advance > Sunil > > ----- Original Message ----- > From: "Sean Schofield" <[EMAIL PROTECTED]> > To: "MyFaces Discussion" <[email protected]> > Sent: Monday, May 02, 2005 10:09 PM > Subject: Re: Regarding datatable > > > AFAIK there are no MyFaces components that will do this for you. You > > could probably modify one of the existing ones to do some of the Excel > > stuff you are talking about. Check here: > > http://jakarta.apache.org/poi/ for a good open source library for > > Excel. > > > > HTH, > > sean > > > > On 5/2/05, Sunil Tiwari <[EMAIL PROTECTED]> wrote: > >> > >> Hi, > >> How to display the sum of all columns (with integer values) in the last > >> column of the datatable from front end only. > >> Moreover, it should display the column total for every column at the > >> bottom > >> of the table. > >> And all the other functionalities of the table shd be still supported > >> like > >> pagination and scrollability. > >> Like a table is displaying 100 records and i display 10/20/40 records per > >> page. It shd then display the column totals for every page > >> for 10/20/40 records. > >> > >> Does anyone knows then how to display the details of the datatable in an > >> excel sheet from within the MyFaces application. > >> > >> > >> Thanx in advance > >> Sunil > >

