[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??
.
Re: Fast write to excel, no more working.
Re: Fast write to excel, no more working.
Quote:
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...
_
Re: Fast write to excel, no more working.
I'm glad that you got it solved! :)
I don't know, perhaps luck :lol: 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!
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.
Re: [RESOLVED] Fast write to excel, no more working.
Please don't reply. HanneSThEGreaT's url provides the info. Thanks, both.