Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 17067
  • Last Modified:

How to embed excel in html document?

Is it possible to embed excel file displayed in one portion of a html page without using frameset?
or is it possible to embed another html page in one portion of a html page without using frameset?
I hope any expert can help me, thanks...
0
kenny_yap
Asked:
kenny_yap
  • 3
  • 3
  • 2
  • +4
1 Solution
 
hongjunCommented:
try this

<a href="myexcel.xls">Click here</a>
0
 
king_villyCommented:
hello kenny
well this problem can be solve with the help of OLE Object link library ....
you hvae to use ASP with ur HTML Page for this type of functionality .
There is a Hint for u ...

 Dim a
set a = server.CreateObject("Class.Subclass")
search Class and subclass for related Product that u want to use (like Excel).
u can also search in ur System32 Folder in windows folder.
use this link for futrther Information :

www.mrexcel.com/archive/General/21675.html 

..regards
-Villy



0
 
fahimnxbCommented:
Dear kenny,

you don't want to use frameset, what about IFrame... use Iframe to embed excel file to any portion of you HTML page, use never get an idea that its a seprate page.

Regards,
Me
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
tomvergoteCommented:
you should use the office web components (owc).
they only work on windows+internet explorers though, i don't know if that's a problem for your audience, but mozilla and the like wont work with them
get them here
http://www.microsoft.com/downloads/details.aspx?FamilyID=982b0359-0a86-4fb2-a7ee-5f3a499515dd&displaylang=en

and learn how to use them here
http://www.adp-gmbh.ch/win/misc/ie/owc/
0
 
kenny_yapAuthor Commented:
hi fahimnxb, if i use iframe, then how can i put the content of excel to be displayed on iframe?
0
 
fahimnxbCommented:
Dear kenny,

Read king_villy  comments....
you definitely need some server side script for it. However just make a html page... load you excel contents by a simple link...
<a href="excel.xls">EXCEL</a>.. and it seems that a part of your page is containing excel file.

If your server has MS OFfice or excel components installed you this will automatically invoke excel viewer in browser.

Regards,
Me
0
 
krakilin2001Commented:
Quickest way is to save your excel spreadsheet as an html file.  Then just copy/paste the code it generates into your page.
0
 
kenny_yapAuthor Commented:
Actually, i am using ASP .NET and I Aspose.Excel component now, I want to generate excel report dynamically and I need the output to be displayed on the web page, i don't want using hyperlink.
0
 
tomvergoteCommented:
Using office web components you can work with excel on the server as well as on the client.
You haven't told us what your server language is, but you could easily google up a few examples (asp + owc turns up thousands of articles)
0
 
king_villyCommented:
Ok ..Ok ..Ok ...Wait i got u kenny_yap ..
infact i was confused about ur question ...i mean about ur purpose ...so this is the Right Soultion for Generating Dynmic Reports on a Page from Excelsheet
.............................................
Soultion is in ADO.NET  ...and i suggest you should carry on this ofr dynmic reports.
..................................................
ADO.Net Support Microsoft Excel as a DataStore and can retrive data from it ...
........................................................
Every DataStore have a Driver . u can say Microsoft is a Data Provider and by using it u can get data from that data store.
-------------------------------------
fortunatly Microsoft Excel has its Data Provider for DotNET so u can use it ...
...................................................
Steps are simple , and i hope u can do it very eaisly ...

1)      Create a Connection Strign from UDL  
File .
User these Classes
->  OLEDataReader
->  OLEDataCommand
->  OLEDataConnection
then after that u can assosiate this DataReader Object with a Grid on ur page
.....
objDataGrid.DataSource = objDataReader
ObjDataGrid.DataBind( )


thats it ...
if u need my help u can ask me again ...
regards
-Villy

0
 
king_villyCommented:
I know this is tuff but this will be best and better way to do things in right direction and as wel as it iwll be better for u in Future Needs.........Even if u need my help again i can send u a Sample Project ....
Regards
-Villy  (sorry again)


0
 
tomvergoteCommented:
there were a few possible solutions posted
0
 
ublendCommented:
In my case, I want to embed MS Office documents in html so I can control what is done with them (restrict them from doing 'save as', copy and paste, etc.) - which I can do on the intranet using javascript.
I can embed MS Word documents in html, but the same script does not work for Excel and Powerpoint, no matter what mime type I use. Any ideas?
Here is a snippet of the successful code:
<OBJECT DATA="Associate Tracking Form.doc" TYPE="application/msword" width="800" height="600"> </object>

Any help is most appreciated.
thanks!
ublend
0

Featured Post

Industry Leaders: 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!

  • 3
  • 3
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now