K
kokyan
I create a Excel Macro using array to import a large text file (man
columns) into a workbook. It come out as out of memory immediately.
I search around in the Internet and found many articles (especiall
from Microsoft) regarding this problem. The articles mention about th
fix memory allocation by Excel itself (not depending to the physica
memory).
I need to import the file into the workbook for the User to edi
certain field. Is there any other way to bypass this limitation o
other methods without using array?
The codes like shown below:
Workbooks.OpenText FileName:= _
"C:\WINDOWS\Desktop\ITIS_V1\DataInterfaceFile20030911025232078.txt"
Origin:= _
xlWindows, StartRow:=1, DataType:=xlFixedWidth
FieldInfo:=Array(Array(0, _
1), Array(42, 1), Array(43, 1), Array(45, 1), Array(46, 1)
Array(51, 1), _
Array(58, 1), Array(65, 1), Array(73, 1), Array(78, 1)
Array(80, 1), Array(100, 1), Array( _
200, 1), Array(220, 1), Array(260, 1), Array(300, 1)
Array(340, 1), Array(360, 1), Array( _
365, 1), Array(450, 1), Array(452, 1), Array(465, 1)
Array(467, 1), Array(470, 1), Array( _
487, 1), Array(504, 1), Array(505, 1), Array(506, 1)
Array(507, 1), Array(508, 1), Array( _
509, 1), Array(569, 1), Array(629, 1), Array(638, 1)
Array(647, 1), Array(677, 1), Array( _
678, 1), Array(680, 1), Array(696, 1), Array(726, 1)
Array(746, 1), Array(747, 1), Array( _
776, 1), Array(806, 1), Array(836, 1), Array(866, 1)
Array(897, 1), Array(898, 1), Array( _
901, 1), Array(902, 1), Array( _
926, 1), Array(946, 1), Array(1146, 1)
columns) into a workbook. It come out as out of memory immediately.
I search around in the Internet and found many articles (especiall
from Microsoft) regarding this problem. The articles mention about th
fix memory allocation by Excel itself (not depending to the physica
memory).
I need to import the file into the workbook for the User to edi
certain field. Is there any other way to bypass this limitation o
other methods without using array?
The codes like shown below:
Workbooks.OpenText FileName:= _
"C:\WINDOWS\Desktop\ITIS_V1\DataInterfaceFile20030911025232078.txt"
Origin:= _
xlWindows, StartRow:=1, DataType:=xlFixedWidth
FieldInfo:=Array(Array(0, _
1), Array(42, 1), Array(43, 1), Array(45, 1), Array(46, 1)
Array(51, 1), _
Array(58, 1), Array(65, 1), Array(73, 1), Array(78, 1)
Array(80, 1), Array(100, 1), Array( _
200, 1), Array(220, 1), Array(260, 1), Array(300, 1)
Array(340, 1), Array(360, 1), Array( _
365, 1), Array(450, 1), Array(452, 1), Array(465, 1)
Array(467, 1), Array(470, 1), Array( _
487, 1), Array(504, 1), Array(505, 1), Array(506, 1)
Array(507, 1), Array(508, 1), Array( _
509, 1), Array(569, 1), Array(629, 1), Array(638, 1)
Array(647, 1), Array(677, 1), Array( _
678, 1), Array(680, 1), Array(696, 1), Array(726, 1)
Array(746, 1), Array(747, 1), Array( _
776, 1), Array(806, 1), Array(836, 1), Array(866, 1)
Array(897, 1), Array(898, 1), Array( _
901, 1), Array(902, 1), Array( _
926, 1), Array(946, 1), Array(1146, 1)