?
Solved

How Do You Open an Excel Spreadsheet Using MVC?

Posted on 2013-11-18
2
Medium Priority
?
1,601 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month12 days, 4 hours left to enroll

752 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