Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Loading a spreadsheet from memory

Sorry, looks like I didn't ask the question very well. blob = binary
large object.

Imagine you open a spreadsheet, just running Excel interactively. The
file you load up sits on the disk, right? And you just issue a "File |
Open" command, select the filename, and you're away...

And of course there's nothing to stop you doing exactly the same thing
programmatically with vba.

Well, in my case I have a program that wants to load up a spreadsheet.
Only thing is, the spreadsheet isn't a file on the disk, it is sitting
in a chunk of the program's memory. Now, as far as my program is
concerned it is just a bunch of binary data, won't make any sense to it
(just the same as if you open an xls file in notepad).

So, the thing to do is to load this chunk of memory into Excel - then I
can use the excel object model to peek at the row/column values.

Hence my earlier question. I want to be able to load a spreadsheet from
memory rather than from a physical file. Any takers?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not Enough Memory opening 2nd spreadsheet Pete Harris Excel Discussion (Misc queries) 2 March 14th 08 04:03 PM
Remove content when saving / loading spreadsheet EZdoesIT Excel Worksheet Functions 4 November 13th 06 03:42 PM
Loading a linked spreadsheet, Microsoft Visual Basic, error while. Wacher Excel Discussion (Misc queries) 0 April 18th 05 03:15 PM
Memory expanding spreadsheet JohnUK Excel Programming 0 June 2nd 04 08:37 PM
Insufficient memory error using shared excel spreadsheet Eric Lustig Excel Programming 1 September 26th 03 06:34 PM


All times are GMT +1. The time now is 09:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"