Click here to Skip to main content
14,427,400 members
Rate this:
Please Sign up or sign in to vote.
See more:
Is there any way to open excel in browser through MVC application, if MS excel not available on client machine?

What I have tried:

I tried on many thing but not get any success.
Posted
Updated 15-Jan-20 1:56am
v2
Comments
F-ES Sitecore 15-Jan-20 4:38am
   
It doesn't have to be Excel proper, but they have to at least have a viewer installed. How else can the browser show the data if it doesn't know how to interpret the file?
Rate this:
Please Sign up or sign in to vote.

Solution 1

Not unless your website can provide an embedded application that can do everything that Excel can do.
   
Comments
Richard MacCutchan 15-Jan-20 4:58am
   
Sorry, I have no details. I am just trying to explain that you cannot edit an Excel file without an application that has all the features of Excel.
Rate this:
Please Sign up or sign in to vote.

Solution 2

If by 'open' you mean 'extract data out of' then there's a couple of ways - assuming it's an xslx file, not xls.

Essentially modern office documents are zip files containing the content of the document, mostly xml. Try renaming a document to have a .zip extension and take a look if you like. The format is Office Open XM[^] standard, since it's developed by Microsoft it has good support in the .Net Framework - although since it's an open standard you could probably extract data out of it using JavaScript in the browser - something like this Open XML SDK for JavaScript | Eric White[^]

If you actually need to edit the spreadsheet, I would probably see what you can do to integrate your application with either Office 365 or Google Docs to leverage their functionality, because building a functional spreadsheet application in a browser is probably a lot more work than it seems like.
   
Comments
F-ES Sitecore 15-Jan-20 7:35am
   
If that was possible, why would anyone buy Excel, Word and so on?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,128
Richard MacCutchan 1,804
phil.o 1,270
Patrice T 1,217
MadMyche 1,110



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100