Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i upload the excel file in file upload button.and click the show button to view the excel means pop up view of excel (if attached excel file in gmail and view the excel file in popup window )how to do it.

What I have tried:

I have search online for reference but the excel viewing application only available.
Posted
Updated 23-Nov-16 1:52am
v2
Comments
[no name] 28-Aug-17 7:21am    
As Afzaal has already mentioned, the reason why you can "preview" the file in Gmail is because they render the file themselves. What this actually means is that they have a "canvas" element on their page and they use JavaScript to draw the file's content on that "canvas".
As you can imagine, this is quite a complicated task so you should probably use an existing solution for this. For example you may want to try out this Excel library for C# and VB.NET. Here you can find an Excel example for ASP.NET and also here you can find a C# and VB.NET conversion example for Excel to HTML.

 
Share this answer
 
v2
They render the uploaded files themselves using the content of files, rendered in native HTML. Browsers are unable to render special file types, such as PDF, MS Word and MS Excel etc. You need either a plugin to be installed on the browser, or you need to render it using HTML, and for that you need to read everything from file and then render it using tables, gridviews etc. Otherwise browser will simply download the file to disk.

Your best bid is to use an Excel to HTML converter, that converts your Excel sheet data to an HTML table element. You can find hundreds of them online. Google[^] will help. There are special libraries created too, .NET Office[^] etc that can be utilized here. But choice is yours.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900