Solved

How Do You Open an Excel Spreadsheet Using MVC?

Posted on 2013-11-18
2
1,391 Views
Last Modified: 2013-11-19
I need to open an Excel Spreadsheet using MVC with the ActionResult MVC pattern?

Thanks,

Dan
0
Comment
Question by:danielolorenz
2 Comments
 
LVL 30

Expert Comment

by:Alexandre Simões
ID: 39658666
Well, I'm missing some information here.

MVC is not responsible for opening any excel file so where do you need to open it and what do you want to do with it?

Do you want to open it in C# and do something with it or you just need to give the user the option to open a certain file in its own installed Excel application?
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 39659197
It sounds like you need a File action result:

public ActionResult OpenExcel(string fileName)
{
    ...
    return File(filename), "application/xls");
}

Open in new window

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now