Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    26
    Thanks
    1
    Thanked 0 Times in 0 Posts

    write data to excel file from access database using jsp

    hi all
    especially hi to those who is reading this question
    i m writing a program in which i hav to write to excel file the contents of access database using jsp.can i use apache poi & please suggest me how to use it.
    reply as fast as u can. it is very important to me.

  • #2
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by santosh_tamse View Post
    hi all
    especially hi to those who is reading this question
    i m writing a program in which i hav to write to excel file the contents of access database using jsp.can i use apache poi & please suggest me how to use it.
    reply as fast as u can. it is very important to me.

    I am not a jsp user, but if I understood your issue, you want to get an excel file from a web page, in this case made with jsp.

    I did this with php, and it's quite easy.

    1. you select the information of your database
    2. create a string on the format csv (comma separated) as that file can be saved as file.xls and opened by excel
    3. output the file as HTML header to force browser to save excel file

    This would be a php header set to be able to output a "Save as...":
    Code:
    header("Content-type: application/x-msexcel");
    header("Content-disposition: attachment; filename=".$filename);
    header("Pragma: no-cache");
    header("Expires: 0");
    
    print $csv_output;


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •