View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Loading a spreadsheet from memory

Peter,

I am unfamiliar with the programming term "blob".
However, if your data is stored in an array then
data in an array can be transferred directly to
an Excel worksheet...
'-------------------------------
Sub Test()
Dim strArray() As String
Dim i As Long
Dim j As Long
ReDim strArray(1 To 10, 1 To 10)

For i = 1 To 10
For j = 1 To 10
strArray(i, j) = i * j
Next
Next
Worksheets(1).Range("A1:J10").Value = strArray

End Sub
'------------------------------
Regards,
Jim Cone
San Francisco, USA


"Peter Hurford" wrote in message
oups.com...
I have a program which has an xsl file sitting in a blob of memory.
I want to use the Excel object model to load up the blob, and to read
the rows/columns etc.
Is there any way to do this *without* having to save my blob to a file
on the hdd first? I would like to keep everything in memory if
possible, since once the blob has been processed, it is discarded.
TIA,
Pete