Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Greetings,

I have a very artistic and beautiful Excel spreadsheet containing all manner of charts and what not that would surely impress you. Let's pretend there is a reason other than my own laziness that I would like to serve this to some folks via a website without having to re-create it as an actual web page myself.

Does anyone know of perhaps a third party control that would accomplish such a thing? ... server-side XLS to HTML gizmo of some sort?

Cheers,
-Jack
Posted

Here are some articles I found that may help, even though I have never attempted this:

Click me![^]

and me![^]

don't forget me![^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 28-Oct-13 23:08pm    
5ed, can be useful.
—SA
Jack Vanderhorst 29-Oct-13 9:09am    
Hi Sergey, thanks for your reply, what is '5ed'?
Sergey Alexandrovich Kryukov 29-Oct-13 10:08am    
It means that I up-voted the maximum mark of "5" the Solution 1 post by richcb. Those votes are summarized with weights to calculate reputation score of a member, how it's often done in other online communities...
—SA
Richard C Bishop 29-Oct-13 10:36am    
Jack, if this solution satisfied your needs, please accept it as the solution so it will be removed from the unanswered pool.
Jack Vanderhorst 29-Oct-13 10:45am    
Hi richcb,

Appreciate your response, but the first link is for some code to generate HTML which is exactly what I'm trying to avoid, the second link involves me uploading private content to Skydrive which is a reliable way to get myself unemployed, and the third link involves again a bunch of code and probably wouldn't handle the charts and fancier content in this particularly beautiful and artistic spreadsheet.

I'd prefer to hold out a bit in case someone else has any thoughts.
Here's what I ended up with, cheap and happy, the spreadsheet shall live on...

C#
//Start Excel and get a handle on the spreadsheet
Microsoft.Office.Interop.Excel.Application objExcel = new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Workbook objWB = objExcel.Workbooks.Open(strPath + strSourceFile);

//Refresh it
objWB.RefreshAll();

//Save it out to html
string strHTMLFileName = strTempPrefix + Guid.NewGuid().ToString() + strHTMLExtension;
objWB.SaveAs(strPath + strHTMLFileName, Microsoft.Office.Interop.Excel.XlFileFormat.xlHtml);
objWB.Close();

//Inject the html into the response
Response.Output.Write(System.IO.File.ReadAllText(strPath + strHTMLFileName));

//Have a nice day
 
Share this answer
 
Comments
Richard C Bishop 30-Oct-13 15:40pm    
Good work!
try Google Doc Viewer. It's very simple to use, free & you do not need any external tool nor dll! Add a markup code like the following in your webpage:


<iframe src="http://docs.google.com/gview?url=URL-TO-YOUR-XLS-FILE&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>


Just set "url" query string param to your Excel file as an absolute URI and that's it!
 
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