![]() |
no calculation during readin large cols (Speed)
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. |
no calculation during readin large cols (Speed)
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. |
no calculation during readin large cols (Speed)
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. |
All times are GMT +1. The time now is 03:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com