Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have DataTable with data. I would like to insert them into Excel worksheet. Now I'm doing this cell by cell in two loop (for). Can it be done faster? thanks in advance P. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
siedem wrote:
*Hi I have DataTable with data. I would like to insert them into Excel worksheet. Now I'm doing this cell by cell in two loop (for). Can i be done faster? thanks in advance P. * Hi siedem, If the data is an arrayi2-D), you can input them to cells more fast. If an array is 1-D, make it as 2-D, or us Application.transpose(array). Example: Code ------------------- Sub Test() Dim arrayData(1 To 1000, 1 To 1) As Long Dim i As Long 'Make a sample array For i = 1 To 1000 arrayData(i, 1) = i Next 'Input an array into cells. Cells(1, 1).Resize(UBound(arrayData, 1), UBound(arrayData, 2)).Value = arrayData End Sub ------------------- -- Message posted from http://www.ExcelForum.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Look at the copy from recordset method of the range object. works with DAO
only in xl97, but with DAO and ADO in later versions. -- Regards, Tom Ogilvy "siedem" wrote in message ... Hi I have DataTable with data. I would like to insert them into Excel worksheet. Now I'm doing this cell by cell in two loop (for). Can it be done faster? thanks in advance P. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I insert a pound sign infront of different values in cells | Excel Discussion (Misc queries) | |||
insert row when sum of values equals 100 | Excel Discussion (Misc queries) | |||
insert row when sum of values equals 100 | Excel Discussion (Misc queries) | |||
Update of cell values after insert row? | Excel Worksheet Functions | |||
Auto insert values? | Excel Discussion (Misc queries) |