|
-
Re: display excel spreadsheet charts on webpage: the SOLUTION
hello,
thank you vince for your response. i checked the article you referred me
to. it was helpful. i also found a very simple SOLUTION to displaying individual
charts on a webpage. i decided to post the code so that it may help those
who are having the same problem.
this is what you do:
open a connection to your excel workbook from your webpage.
set the chart spreadsheet you wish to see to "visible".
set all other spreadsheets to hide.
set your workbook as read-only if you don't want users to change your data/charts.
here is a sample code:
<html><head>
<script language=vbscript>
Dim objExcel
Sub chartsheet_onclick()
call OpenWorkbook("c:\test\testfile.xls")
End Sub
Sub OpenWorkbook(strLocation)
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = true
objExcel.Workbooks.Open strLocation
objExcel.UserControl = true
objExcel.Sheets("chart").Visible = True
objExcel.Sheets("sheet1").Visible = False
objExcel.Sheets("sheet2").Visible = False
objExcel.Sheets("sheet3").Visible = False
End Sub
</script>
<title></title></head><body><br>
this is a test page for displaying an excel chart...
<br><br>
<input type=button name=chartsheet value="display excel chart">
</body></html>
fareeda
"Vince" <vince@vas3.com> wrote:
>
>Link to an answer to this question, may help.
>
>http://news.devx.com/cgi-bin/dnewswe...tem=9154&utag=
>
>"fareeda" <servers52@hotmail.com> wrote:
>>
>>hello,
>>i have excel spreadsheets that contain charts and graphs. i want to display
>>those charts on a webpage WITHOUT having to convert the charts into HTML
>>files. what is the best and easy way to do this? i tried to create a
link
>>to the charts using the <a href = ...> html method. it linked the workbook
>>but not the spreadsheet. i want to link ONLY the spreadsheets. something
>>like this: <a href='[c:\windows\desktop\test.xls]chart'> this didn't work.
>> any idea??? can javascript/vbscript coding do the job? what's a good
>way
>>to do this?
>>
>>thank you,
>>fareeda
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks