D
dmoney
Hello gang -- I am writing an app in vb.net to manipulate some excel files.
the following code works fine on small files (1200 lines) but either takes
forever or fails on large files (67000 lines). im using excel 2007. for each
excel file, i create and instance of excel and leave open for saving
purposes. All this code does is trim the sheet.
AppExcel.Application.ScreenUpdating = False
Dim rng As Excel.Range
Dim wsh As Excel.Range
wsh = AppExcel.Application.ActiveSheet.UsedRange
For Each rng In wsh
rng.Value = LTrim(rng.Value)
Next rng
AppExcel.Application.ScreenUpdating = True
Any help is appreciated.
the following code works fine on small files (1200 lines) but either takes
forever or fails on large files (67000 lines). im using excel 2007. for each
excel file, i create and instance of excel and leave open for saving
purposes. All this code does is trim the sheet.
AppExcel.Application.ScreenUpdating = False
Dim rng As Excel.Range
Dim wsh As Excel.Range
wsh = AppExcel.Application.ActiveSheet.UsedRange
For Each rng In wsh
rng.Value = LTrim(rng.Value)
Next rng
AppExcel.Application.ScreenUpdating = True
Any help is appreciated.