Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9239297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:57:18+00:00 2026-06-18T07:57:18+00:00

I’m developing a Web application using Spring 3.0, JSP, Tiles. On one of the

  • 0

I’m developing a Web application using Spring 3.0, JSP, Tiles.
On one of the JSP pages I’ve to display some data using JQgrid and I’ve to provide a button to facilitate the user to export the data in JQgrid to an Excel Sheet.

I’ve successfully created the JQgrid and am able to display the data.

I was wondering how to implement the “Export To Excel” functionality on the click of a button.
I tried looking for several solutions but couldn’t find anything concrete.

My handler code:

@RequestMapping(method = RequestMethod.POST, value = "/workQueue") 
@ResponseBody   
public JqgridResponse loadXXXXXX(@RequestParam int page, @RequestParam int rows, @RequestParam String sidx, @RequestParam String sord){

    List<ReferralCase> referrals = XXXXService.getReferralCases();

    int endLimit = page * rows;
    int startLimit = endLimit - rows;
    if (endLimit > referrals.size()) {
        endLimit = referrals.size();
    }
    JqgridResponse response = new JqgridResponse();
    response.setRows(referrals.subList(startLimit, endLimit));
    response.setPage(page);
    response.setRecords(referrals.size());
    response.setTotal((referrals.size() / rows) + 1);
    return response;
}

My JSP/JS Code:

    $("#XXXXWorkQueueGrid").jqGrid({
    url:contextRoot+'/dart/workQueue',
    datatype: 'json',
    mtype: 'POST',
    colNames: ['ID','Created','Last Name','First Name','A1','A2','Status','Updated','Workflow'],
    colModel: [
               { name: 'recordId', index: 'recordId', width: 30 },
               { name: 'creationDate', index: 'creationDate', width: 40 },                   
               { name: 'lastName', index: 'lastName', width: 60 },
               { name: 'firstName', index: 'firstName', width: 60 },
               { name: 'A1', index: 'A1', width: 25 },
               { name: 'A2', index: 'A2', width: 25 },
               { name: 'status', index: 'status', width: 40 },
               { name: 'updateDate', index: 'updateDate', width: 40 },
               { name: 'workflow', index: 'workflow', width: 90 }
    ],onPaging: function() {
        $(this).setGridParam({datatype: 'json'}).triggerHandler("reloadGrid");
    },loadComplete: function() {
        $(this).setGridParam({datatype: 'json'}).triggerHandler("reloadGrid");
    },loadError: function(xhr,st,err) {
        alert(err);
    },onSelectRow : function(rowid, status, e) {
        var selRow = $(this).getGridParam("selrow");
        var selRecordId = $(this).getCell(selRow, 'recordId');
        window.location = (contextRoot+"XXXX/referralDetails?recId=" + selRecordId );            
    },
    pager: '#XXXXWorkQueuePager',
    jsonReader: {
        repeatitems: false,
        root: "rows",
        page: "page",
        total: "total",
        records: "records"
    },
    sortorder: "asc",
    sortname: 'recordId',
    gridview: true,
    viewrecords: true,
    hoverrows : false,
    autowidth: true,
    height: 'auto',
    rowNum: 12,
    forceFit: true,
    altRows:true
});
$("#XXXXXWorkQueueGrid").jqGrid('navGrid','#XXXXXWorkQueuePager',{edit:false, add:false, del:false, search:false}); 

});

JqgridResponse is just a custom DAO class created by me.

Any help is appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:57:19+00:00Added an answer on June 18, 2026 at 7:57 am

    You can generate a new Excel file using Apache POI and use Spring AbstractExcelView to make it downloadable. Just follow this turorial to setup everything.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I'm making a simple page using Google Maps API 3. My first. One marker
I am reading a book about Javascript and jQuery and using one of the
I am using jsonparser to parse data and images obtained from json response. When
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am using JSon response to parse title,date content and thumbnail images and place
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.