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 6553335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:34:09+00:00 2026-05-25T12:34:09+00:00

I am using MVC3 Web Grid. I need to export the data into excel

  • 0

I am using MVC3 Web Grid. I need to export the data into excel 2003 and Higher and to PDF.

I have two button under the grid, When I click on the first button, I should be able to export to excel 2003 and save the data.

When I click on the second button, I should be able to export in to PDF format.

Using Grid View in Webforms, I have done that, but using MVC3, I have not done that.

Any directions please? Is there anything that comes up with in MVC3 framework for export functionality.

Thank you

  • 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-05-25T12:34:10+00:00Added an answer on May 25, 2026 at 12:34 pm

    Is there anything that comes up with in MVC3 framework for export functionality.

    No nothing. To export to Excel you could use CSV and use a controller action which will fetch the data from wherever you fetched it initially to display on the grid and return a File content with CSV:

    public ActionResult ExportToExcel()
    {
        byte[] csvData = ... fetch the data from your repository and convert to CSV
        return File(csvData, "text/csv", "data.csv");
    }
    

    To export to PDF, well, nothing built-in .NET. You will need a third party library. Personally I use iTextSharp to achieve this functionality.

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

Sidebar

Related Questions

I have a web project using asp.net mvc3. Now clients ask for a security
I have an ASP.NET MVC 3 Web Application using Linq-to-SQL for my data access
I have created a sample project using ASP.NET MVC 3 Web Application (Razor) template.
I am developing one new area of a fairly large web application using MVC3
I've got a simple web application using ASP.NET MVC3 and Ninject.Web.MVC (the MVC3 version).
I am trying to get client validation working in MVC3 using data annotations. I
I'm using MVC3 and I need a HTMLHelper with image, so I found a
I'm working on an MVC3 web application using the razor view engine. I'm looking
I have developed a project using MVC3 and Code first Entity Framework 4.0 as
I have Ninject working nicely in an ASP.NET MVC3 web application. I'd like to

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.