How to Transfer xml data from VB6 server to Excel2003 (client) fast?

T

tmarko

My application is initiated by a user on client (the user choose a
report) then I make a server side calculation by using the office web
component (simulating Excel in an ActiveX dll) VB6.

Then I would like to send the resulting data to the calling client
(Excel Addin + VB6 Client). I'm using Excel2003.

Why I make a serverside calculation instead of send the values and
formulas to Excel and let Excel do the work on the client are :

1. I want to filter the data after the calculation and only send part
of the resulting data

2. Some clients will be browsers without calculations possibilities

3. Exporting data to other systems with no calculation possibilities


How should I send the data in the fastest and smartest way to the
client and then populate an Excelsheet on the client.

In xml? And should I as in my example below make an xml file?How do I
send that to the client? The xml file could be as large as 2 Mb.

Or should I collect the data from the spreadsheet in an other format
and send it as a recordset to the client?

To populate the Excelsheet on the client is it faster to use xml or a
recordset?

In which format can the filtering be done fast ? when the data is in
xml or in a recordset?

I would be happy for some feedback on this topic or a link where they
deal with this. Been searching the web for a while, but not found any
really good stuff

This is part of the code I use when using the spreadsheet component and
it works fine and produce an xml file on the server. But the whole
process takes 1 min to fill 14000 cells. Is there a faster way to fill
the spreadsheet component than looping through a recordset and use
wksheet.cells ?


Dim objXL As Object
Dim WkSheet As Object

Set objXL = CreateObject("OWC11.Spreadsheet.11")
Set WkSheet = objXL.Worksheets.Add

WkSheet.Activate

‘Looping trough recordset and fill the spreadsheet

WkSheet.Cells(lngRow, lngCol).Name = rsA("Mnemonic")
WkSheet.Cells(lngRow, lngCol).value = rsA("Short")

WkSheet.Cells(lngRow, lngCol + 1)

WkSheet.calculate
Dim xmldata As String

xmldata = objXL.xmldata
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top