Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Create an interactive Excel web page

by Anonymous Monk
on Apr 21, 2005 at 11:52 UTC ( [id://449938]=note: print w/replies, xml ) Need Help??


in reply to Create an interactive Excel web page

Thanks John - tis is a really useful example - particularly as I can never find the right CLSID's when I need them.

You can make this example a little more general by embedding a 2002 object inside a 2003 object - which means you can send it to a client browser without needing them to pick the version.

The browser will then cascade to the one it can handle. (Although you have to send the data twice.)

64 # Insert the ExcelXML code into a Html doc using a simple temp +late. 65 # Use HTML::Template or the Template::Toolkit for real applica +tions. 66 # 67 my $clsid2002 = "CLSID:0002E541-0000-0000-C000-000000000046" ; 68 my $clsid2003 = "CLSID:0002E559-0000-0000-C000-000000000046" ; 69 70 my $template = do {local $/; <DATA>}; 71 $template =~ s/__EXCEL_XML_DATA__/$xml_str/g; 72 $template =~ s/__SPREADSHEET_CLSID2002__/$clsid2002/; 73 $template =~ s/__SPREADSHEET_CLSID2003__/$clsid2003/; 74 75 print $template; 76 77 78 79 __END__ 80 Content-type: text/html 81 82 83 <html xmlns:o="urn:schemas-microsoft-com:office:office" 84 xmlns:x="urn:schemas-microsoft-com:office:excel" 85 xmlns="http://www.w3.org/TR/REC-html40"> 86 87 <body> 88 <div id="Spreadsheet" align=center x:publishsource="Ex +cel"> 89 <object id="Spreadsheet" classid="__SPREADSHEET_CL +SID2003__"> 90 <param name=DisplayTitleBar value=false> 91 <param name=Autofit value=true> 92 <param name=DataType value=XMLData> 93 <param name=XMLData value="__EXCEL_XML_DATA__ +"> 94 <object id="Spreadsheet" classid="__SPREADSHEET_CL +SID2002__"> 95 <param name=DisplayTitleBar value=false> 96 <param name=Autofit value=true> 97 <param name=DataType value=XMLData> 98 <param name=XMLData value="__EXCEL_XML_DATA__ +"> 99 <p> 100 To use this Web page interactively, you mu +st have Microsoft Internet Explorer 5.01 Service Pack 2 (SP2) or late +r and the Correct V ersion of Microsoft Office Web Components. 101 </p> 102 <p> 103 See the <a href="http://r.office.microsoft +.com/r/rlidmsowcpub?clid=1033&amp;p1=Excel"> 104 Microsoft Office Web site</a> for more inf +ormation. 105 </p> 106 </object> 107 </object> 108 </div> 109 </body> 110 </html>

Replies are listed 'Best First'.
Re^2: Create an interactive Excel web page
by Anonymous Monk on Oct 09, 2007 at 21:44 UTC
    what if you dont want to enable editing in the file and also display a image by just passing the url from a cell.One image per one line or row. Is it possible?? Thanks for the above example.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://449938]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-03-29 12:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found