I have two HTM files, each for displaying an Office/Excel Pivot Table on the web (using OWC). One was created with FrontPage (insert>component>pivot table, property toolbox>data source...) and one from Excel (select pivot table, save as web page...).
The Excel exporting process produced also a couple of XML files named "filelist.xml" and "...cachedata....xml" containing all data, referenced below. The core object tag looks like this (long XML data replaced with '...'):
<object
id="Group_Demand_Report_Chicago_29815_PivotTable"
classid="CLSID:0002E552-0000-0000-C000-000000000046">
<param name=XMLData
value="<!--[if gte mso 9]><xml xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"
...
<CacheFile HRef="pt_files/Group_29815_cachedata001.xml"/>
...
</PTFormat> </PivotTable> </xml><![endif]-->">
</object>
The FrontPage generation process asked for various data source information, from which I could choose either a data source control, or a connection with command text. I chose the latter and was forced to pick from a list of installed OLE DB providers. I picked the Jet provider, put my data in an Access db, typed in an SQL statement got the data connected to the object. The FrontPage-generated object tag looks like this, and includes no other related files:
<object classid="CLSID:0002E552-0000-0000-C000-000000000046" id="PivotTable1" codebase="file:msowc.cab" width="518" height="205">
<param name="XMLData" value="<xml xmlns:x="urn:schemas-microsoft-com:office:excel">
<x:PivotTable>
<x:OWCVersion>9.0.0.3821</x:OWCVersion>
<x:CacheDetails/>
<x:ConnectionString>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\test.mdb;Persist Security Info=False;Jet OLEDB:Database Password=&quot;&quot;</x:ConnectionString>
<x:CommandText>select * from test;</x:CommandText>
<x:Name>PivotTable</x:Name>
<x:DataAxisEmpty/>
<x:PivotField>
<x:Name>ID</x:Name>
<x:DataType>Number</x:DataType>
...
</xml>">
</object>
Here is my problem. The Excel-generated object transmits the entire cachedata.xml file to the client upon loading the object. This is undesirable because the file is too large (can be hundreds of megs). The FrontPage-generated object, while asking me for connection details upon preparation server-side, stores the connection properties in the object tag, and then looks for this connection client-side, rather than asking the server for data as needed.
I need this object to request data from the server, but not try to download everything all at once as soon as the object is loaded. What I need to know is whether this OWC is built to handle such a scenario -- can I set this up so that user interaction with the object dictates which data is requested from the server? Or must the object contain all data client-side, and if so, can it be transmitted in a better way than downloading hundreds of megs of XML data? If there's a way to code this object tag so that it maintains a connection with the server, reducing bandwidth load at startup, I would like to know about it.
by: zorvekPosted on 2007-06-25 at 09:58:27ID: 19357219
I don't know if you will have that degree of control. Something tells me you won't, otherwise you could build a real client-server application and that just doesn't seem like something this could handle.
You are probably going to have to start adding some custom code to the page like Javascript to modify the query on the fly.
I'm certainly not an expert in this area so please do not take my opinions too seriously :-)
I'll see if I can get some more help...
Kevin