B
Brian Hman
We have an OWC pivot table that we use to display data from a backend
data source. We use a data handler to send this pivot table data. Now we'd
like to use an OWC spreadsheet to display data--especially html links, and I
can't seem to find the right example to do this.
Here's the pivot table code that we are currently using:
<script language="JScript">
function btnSubmit_OnClick()
{
var strQuery =
"http://igor/_layouts/DataTransform/SasResponder.ashxsasQuery=" +
document.Form1.sasQuery.value;
var strConnectionString = "Provider=MSPERSIST";
//Create a new ADODB.Recordset object for retrieving the XML data from the
server.
var objRecordset = new ActiveXObject('ADODB.Recordset');
//Open the Recordset by pointing to the URL for the ASP.NET Handler
//...that returns our XML data
try
{
objRecordset.Open(strQuery, strConnectionString);
if (!objRecordset.EOF)
{
document.pt.DataSource = objRecordset;
//Automatically displays all columns on the pivottable
document.pt.ActiveView.AutoLayout();
document.pt.ActiveView.UseProviderFormatting = false;
document.pt.Height=500;
document.pt.Width=1500;
}
}
catch(e)
{
document.pt.write("No Data Returned");
}
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<h2>Call Data</h2>
<form id="Form1" method="post" runat="server">
<TEXTAREA id="Query" style="Z-INDEX: 101; LEFT: 5px; WIDTH:
600px; POSITION: absolute; TOP: 0px;
HEIGHT: 300px"
rows="2" cols="46">
select state,sbmtdt,rsbmtdt,dupdate,insdate,traknum from
iba_adh.colo1104 where state='CO'
</TEXTAREA>
<INPUT id="btnSubmit" style="Z-INDEX: 103; LEFT: 584px; WIDTH:
96px; POSITION: absolute; TOP: 0px; HEIGHT: 24px"
onclick="javascript:btnSubmit_OnClick();" type="button"
value="SubmitQuery">
<OBJECT class="ptexec" id="pt" style="Z-INDEX: 107; LEFT:
184px;
WIDTH: 502px; POSITION: absolute; TOP: 350px; HEIGHT: 217px"
height="217" width="502"
classid="clsid:0002E55A-0000-0000-C000-000000000046"
VIEWASTEXT>
<PARAM NAME="XMLData" VALUE='<xml xmlns:x="urn:schemas-
microsoft-comffice:excel">
<xivotTable>
<x:OWCVersion>11.0.0.5531 </x:OWCVersion>
<xisplayScreenTips/>
<x:CubeProvider>msolap.2</x:CubeProvider>
<x:CacheDetails/>
<xivotView>
<x:IsNotFiltered/>
</xivotView>
</xivotTable>
</xml>'>
</OBJECT>
</form>
</body>
I would like to find an example of the Spreadsheet component that does the
same thing. I tried to use the Pivot Table example shown above to help me
with the Spreadsheet, but it doesn't return data to the Spreadsheet. I
stepped through the client side code within the debugger and the code to get
the data is executing.
Here's what I tried to do:
<script language="JScript">
function btnSubmit_OnClick()
{
var strQuery =
"http://igor/_layouts/DataTransform/SasResponder.ashxsasQuery=" +
document.Form1.sasQuery.value;
var strConnectionString = "Provider=MSPERSIST";
//Create a new ADODB.Recordset object for retrieving the XML data from the
server.
var objRecordset = new ActiveXObject('ADODB.Recordset');
//Open the Recordset by pointing to the URL for the ASP.NET Handler
//...that returns our XML data
try
{
objRecordset.Open(strQuery, strConnectionString);
if (!objRecordset.EOF)
{
document.pt.DataSource = objRecordset;
document.pt.Height=500;
document.pt.Width=1500;
}
}
catch(e)
{
//document.pt.write("No Data Returned");
}
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<h2>Call Sas Data</h2>
<form id="Form1" method="post" runat="server">
<TEXTAREA id="sasQuery" style="Z-INDEX: 101; LEFT: 5px; WIDTH: 600px;
POSITION: absolute; TOP: 0px; HEIGHT: 300px"
rows="2" cols="46">
select state,sbmtdt,rsbmtdt,dupdate,insdate,traknum from
iba_adh.colo1104 where state='CO'
</TEXTAREA>
<INPUT id="btnSubmit" style="Z-INDEX: 103; LEFT: 584px; WIDTH: 96px;
POSITION: absolute; TOP: 0px; HEIGHT: 24px"
onclick="javascript:btnSubmit_OnClick();"
type="button" value="Submit Query">
<OBJECT class="phooey"
id="pt"
style="Z-INDEX: 107; LEFT: 184px; WIDTH: 502px; POSITION:
absolute;
TOP: 350px; HEIGHT: 217px"
classid="CLSID:0002E559-0000-0000-C000-000000000046" VIEWASTEXT>
<PARAM NAME="DataType" VALUE="XMLDATA">
</OBJECT>
</form>
</body>
I don't think I have the correct parameters set. Any hints or urls are
greatly appreciated.
Brian Hman
data source. We use a data handler to send this pivot table data. Now we'd
like to use an OWC spreadsheet to display data--especially html links, and I
can't seem to find the right example to do this.
Here's the pivot table code that we are currently using:
<script language="JScript">
function btnSubmit_OnClick()
{
var strQuery =
"http://igor/_layouts/DataTransform/SasResponder.ashxsasQuery=" +
document.Form1.sasQuery.value;
var strConnectionString = "Provider=MSPERSIST";
//Create a new ADODB.Recordset object for retrieving the XML data from the
server.
var objRecordset = new ActiveXObject('ADODB.Recordset');
//Open the Recordset by pointing to the URL for the ASP.NET Handler
//...that returns our XML data
try
{
objRecordset.Open(strQuery, strConnectionString);
if (!objRecordset.EOF)
{
document.pt.DataSource = objRecordset;
//Automatically displays all columns on the pivottable
document.pt.ActiveView.AutoLayout();
document.pt.ActiveView.UseProviderFormatting = false;
document.pt.Height=500;
document.pt.Width=1500;
}
}
catch(e)
{
document.pt.write("No Data Returned");
}
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<h2>Call Data</h2>
<form id="Form1" method="post" runat="server">
<TEXTAREA id="Query" style="Z-INDEX: 101; LEFT: 5px; WIDTH:
600px; POSITION: absolute; TOP: 0px;
HEIGHT: 300px"
rows="2" cols="46">
select state,sbmtdt,rsbmtdt,dupdate,insdate,traknum from
iba_adh.colo1104 where state='CO'
</TEXTAREA>
<INPUT id="btnSubmit" style="Z-INDEX: 103; LEFT: 584px; WIDTH:
96px; POSITION: absolute; TOP: 0px; HEIGHT: 24px"
onclick="javascript:btnSubmit_OnClick();" type="button"
value="SubmitQuery">
<OBJECT class="ptexec" id="pt" style="Z-INDEX: 107; LEFT:
184px;
WIDTH: 502px; POSITION: absolute; TOP: 350px; HEIGHT: 217px"
height="217" width="502"
classid="clsid:0002E55A-0000-0000-C000-000000000046"
VIEWASTEXT>
<PARAM NAME="XMLData" VALUE='<xml xmlns:x="urn:schemas-
microsoft-comffice:excel">
<xivotTable>
<x:OWCVersion>11.0.0.5531 </x:OWCVersion>
<xisplayScreenTips/>
<x:CubeProvider>msolap.2</x:CubeProvider>
<x:CacheDetails/>
<xivotView>
<x:IsNotFiltered/>
</xivotView>
</xivotTable>
</xml>'>
</OBJECT>
</form>
</body>
I would like to find an example of the Spreadsheet component that does the
same thing. I tried to use the Pivot Table example shown above to help me
with the Spreadsheet, but it doesn't return data to the Spreadsheet. I
stepped through the client side code within the debugger and the code to get
the data is executing.
Here's what I tried to do:
<script language="JScript">
function btnSubmit_OnClick()
{
var strQuery =
"http://igor/_layouts/DataTransform/SasResponder.ashxsasQuery=" +
document.Form1.sasQuery.value;
var strConnectionString = "Provider=MSPERSIST";
//Create a new ADODB.Recordset object for retrieving the XML data from the
server.
var objRecordset = new ActiveXObject('ADODB.Recordset');
//Open the Recordset by pointing to the URL for the ASP.NET Handler
//...that returns our XML data
try
{
objRecordset.Open(strQuery, strConnectionString);
if (!objRecordset.EOF)
{
document.pt.DataSource = objRecordset;
document.pt.Height=500;
document.pt.Width=1500;
}
}
catch(e)
{
//document.pt.write("No Data Returned");
}
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<h2>Call Sas Data</h2>
<form id="Form1" method="post" runat="server">
<TEXTAREA id="sasQuery" style="Z-INDEX: 101; LEFT: 5px; WIDTH: 600px;
POSITION: absolute; TOP: 0px; HEIGHT: 300px"
rows="2" cols="46">
select state,sbmtdt,rsbmtdt,dupdate,insdate,traknum from
iba_adh.colo1104 where state='CO'
</TEXTAREA>
<INPUT id="btnSubmit" style="Z-INDEX: 103; LEFT: 584px; WIDTH: 96px;
POSITION: absolute; TOP: 0px; HEIGHT: 24px"
onclick="javascript:btnSubmit_OnClick();"
type="button" value="Submit Query">
<OBJECT class="phooey"
id="pt"
style="Z-INDEX: 107; LEFT: 184px; WIDTH: 502px; POSITION:
absolute;
TOP: 350px; HEIGHT: 217px"
classid="CLSID:0002E559-0000-0000-C000-000000000046" VIEWASTEXT>
<PARAM NAME="DataType" VALUE="XMLDATA">
</OBJECT>
</form>
</body>
I don't think I have the correct parameters set. Any hints or urls are
greatly appreciated.
Brian Hman