Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Group,
i read in a lot of data from a file with many lines and put in in the worksheet with cells Do Until EOF(InFile) Input #InFile, X Worksheets("test").Cells(5, Line).Value = X Zeile = Zeile + 1 Loop It seems the whole worksheet is updated for every line so the read in is very slow. Can I disable the update during readin, Application.ScreenUpdating = False does not help or is the an more effective whay to modify a long Col with ab buffer or so. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
Set the Calulation property to xlManual before reading in the data, en afterwards put it back on xlAutomatic. greetings "iwl" schreef in bericht ... Hello Group, i read in a lot of data from a file with many lines and put in in the worksheet with cells Do Until EOF(InFile) Input #InFile, X Worksheets("test").Cells(5, Line).Value = X Zeile = Zeile + 1 Loop It seems the whole worksheet is updated for every line so the read in is very slow. Can I disable the update during readin, Application.ScreenUpdating = False does not help or is the an more effective whay to modify a long Col with ab buffer or so. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Read the data into a VBA array, then dump it into the sheet in one command:
Dim a() as variant dim i as long i=0 redim a(1 to 1) ' open the file etc. do until eof(infile) i=i+1 redim a(1 to i) input #infile, a(i) loop worksheets("test").Cells(5,1).resize(i).value = _ worksheetfunction.transpose(a) - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "iwl" wrote in message ... Hello Group, i read in a lot of data from a file with many lines and put in in the worksheet with cells Do Until EOF(InFile) Input #InFile, X Worksheets("test").Cells(5, Line).Value = X Zeile = Zeile + 1 Loop It seems the whole worksheet is updated for every line so the read in is very slow. Can I disable the update during readin, Application.ScreenUpdating = False does not help or is the an more effective whay to modify a long Col with ab buffer or so. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Improve speed of saving a large Excel file | Excel Discussion (Misc queries) | |||
Calculation based on 2 cols | Excel Discussion (Misc queries) | |||
Range.Select 1st pass 13 cols, 2nd paqss 25 cols twice as wide in error? | Excel Programming | |||
Cond Format:re color 2 cols, skip 2 cols | Excel Worksheet Functions | |||
Problem with speed of PasteSpecial for large ranges | Excel Programming |