Clarkie001
IS-IT--Management
Hi,
I am using IIS on XP to create a corporate intranet site, before it is loaded onto the corporate servers.
I am having issues getting OWC to run... see below code. - I am getting "ASP 0177 Invalid Class String" error.
I do not have Office XP installed, I have only installed the seperate OWC web download.
Any help on this would be greatly appreciated
Thanks
Clarkie
<%
'set Chart Objects and properties
set objCSpace = Server.CreateObject("OWC.Chart")
set objChart = objCSpace.charts.add()
set objConstants = objCSpace.constants
objchart.type=objconstants.chChartTypeColumnClustered
objchart.HasLegend = true
set objCSpace.datasource = rs
objchart.setdata objconstants.chDimSeriesNames, 0, "Type"
objchart.setdata objconstants.chDimCategories, 0, "Year"
objchart.setdata objconstants.chDimValues, 0, "Value"
'Chart formats
objchart.hastitle = true
objchart.title.caption = "Income vs Expenditure"
set objfont = objchart.title.font
objfont.name = "Tahoma"
objfont.size = 10
objfont.bold = true
set objaxis = objchart.axes(objconstants.chAxisPositionBottom)
objaxis.hastitle = true
objaxis.title.caption = "Year"
set objfont = objaxis.title.font
objfont.name = "Tahoma"
objfont.size = 10
objfont.bold = true
set objaxis = cht.axes(objconstants.chAxisPositionLeft)
objaxis.numberformat = "Currency"
objaxis.hastitle = true
objaxis.title.caption = "£000s"
set objfont = objaxis.title.font
objfont.name = "Tahoma"
objfont.size = 10
objfont.bold = true
'Filesystemobject code - save the current chart to a gif with a temporary filename using FSO
set fso = server.createobject("Scripting.FileSystemObject")
strfilename = server.mappath("-") & "\" & fso.gettempname()
objCSpace.exportpicture strfilename, "gif", 800, 400
on error resume next
set objbinaryfile = server.createobject("BinaryFileStream.object")
response.binarywrite objbinaryfile.getfilebytes(cstr(strfilename))
objbinaryfile.deletefile cstr(sfullfilename)
'clear variables
set objbinaryfile = nothing
set fso = nothing
set objCSpace = nothing
%>
I am using IIS on XP to create a corporate intranet site, before it is loaded onto the corporate servers.
I am having issues getting OWC to run... see below code. - I am getting "ASP 0177 Invalid Class String" error.
I do not have Office XP installed, I have only installed the seperate OWC web download.
Any help on this would be greatly appreciated
Thanks
Clarkie
<%
'set Chart Objects and properties
set objCSpace = Server.CreateObject("OWC.Chart")
set objChart = objCSpace.charts.add()
set objConstants = objCSpace.constants
objchart.type=objconstants.chChartTypeColumnClustered
objchart.HasLegend = true
set objCSpace.datasource = rs
objchart.setdata objconstants.chDimSeriesNames, 0, "Type"
objchart.setdata objconstants.chDimCategories, 0, "Year"
objchart.setdata objconstants.chDimValues, 0, "Value"
'Chart formats
objchart.hastitle = true
objchart.title.caption = "Income vs Expenditure"
set objfont = objchart.title.font
objfont.name = "Tahoma"
objfont.size = 10
objfont.bold = true
set objaxis = objchart.axes(objconstants.chAxisPositionBottom)
objaxis.hastitle = true
objaxis.title.caption = "Year"
set objfont = objaxis.title.font
objfont.name = "Tahoma"
objfont.size = 10
objfont.bold = true
set objaxis = cht.axes(objconstants.chAxisPositionLeft)
objaxis.numberformat = "Currency"
objaxis.hastitle = true
objaxis.title.caption = "£000s"
set objfont = objaxis.title.font
objfont.name = "Tahoma"
objfont.size = 10
objfont.bold = true
'Filesystemobject code - save the current chart to a gif with a temporary filename using FSO
set fso = server.createobject("Scripting.FileSystemObject")
strfilename = server.mappath("-") & "\" & fso.gettempname()
objCSpace.exportpicture strfilename, "gif", 800, 400
on error resume next
set objbinaryfile = server.createobject("BinaryFileStream.object")
response.binarywrite objbinaryfile.getfilebytes(cstr(strfilename))
objbinaryfile.deletefile cstr(sfullfilename)
'clear variables
set objbinaryfile = nothing
set fso = nothing
set objCSpace = nothing
%>