Hello,

I am trying to create pivot tables using data from CSV files. Here is an example:

Please Login or Register  to view this content.
Running this code gives the following exeption:

Exception from HRESULT: 0x800A03EC
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFla
gs flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Microsoft.Office.Interop.Excel.PivotCache.set_Recordset(Object )
at Project1.Sandbox.Main() in C:\Documents and Settings\vvishakh\My Documents
\Visual Studio 2005\Projects\Project1\Project1\Sandbox.cs:line 43


The above is caused by the line
Please Login or Register  to view this content.
If I add the line below right before opening the Recordset, the code works and a pivot table shows up:

Please Login or Register  to view this content.
However, I want to use asUseServer since some of the files I read in are as large as 100 MB and can contain more than half a million rows. adUseClient uses up all my memory, I get an OutOfMemoryException and the pivot table doesn't load.

I have been grappling with the problem over the past few days and would be very grateful if someone could tell me how to get Excel pivot caches to accept Recordsets using adUseServer.

(Also posted at http://msdn.microsoft.com/newsgroups...bfc96b82cc&p=1)