Solved

How Do You Open an Excel Spreadsheet Using MVC?

Posted on 2013-11-18
2
1,488 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 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