|
-
March 6th, 2008, 09:50 AM
#1
[RESOLVED] Fast write to excel, no more working.
In VB6, this code worked fine, and was the fastest way to write to excel:
Code:
Dim MyExcelRange As Excel.Range
'Code here filling MyExcelRange with data
'Now, fast copying into excel:
With MyExcelRange
MyExcelWorksheet.Range("A1").Resize(.Rows.Count, .Columns.Count) = MyExcelRange
End With 'MyExcelRange
But now, in VB.NET .Resize() is a read only property, so it no more works.
Is critical to write the data fast, so what is the new fast way to transfer data to excel??
.
-
March 7th, 2008, 02:42 AM
#2
Re: Fast write to excel, no more working.
-
March 7th, 2008, 06:50 AM
#3
Re: Fast write to excel, no more working.
 Originally Posted by HanneSThEGreaT
It is. You did it again. Thanks you.
For short, the new right line of code is:
Code:
MyExcelWorksheet.Range("A1").Resize(.Rows.Count, .Columns.Count).Value = MyExcelRange
By the way... ¿how did you find it? I had searched it for hours...
_
-
March 7th, 2008, 07:12 AM
#4
Re: Fast write to excel, no more working.
I'm glad that you got it solved! 
I don't know, perhaps luck LOL! No, seriouisly, I've got a huge list of resource websites on my PC, which I've compiled over the years, so that made it a little bit easier 
Have fun!
-
March 7th, 2008, 02:15 PM
#5
Re: [RESOLVED] Fast write to excel, no more working.
Marraco:
How do you assign data to MyExcelRange. Do the data have to come from Excel or can it be dataset or a 2-D array? Thanks.
-
March 7th, 2008, 02:19 PM
#6
Re: [RESOLVED] Fast write to excel, no more working.
Please don't reply. HanneSThEGreaT's url provides the info. Thanks, both.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|