My VBA macro in Excel will need to open an instance of Word, then via Word open an 8meg 85,000 row text file and delete the blank rows and save it as a text file.
If I get that far I can then fit it into Excel and take it from there.
Why not create a macro in Excel to delete the excessive rows?
I have a macro on my PC at work I created that will break the text file into two spreadsheets, delete the unneeded rows and then combine the whole thing into one spreadsheet.
It can be done... would you like to see my code???
Here it is... you'll will have to change the way it searches for blanks (maybe do a sort and then delete blanks). I wrote most of this by letting Excel write it.
' Save first chunk of data file temporarily
ActiveWorkbook.SaveAs FileName:="TempInput.xls", _
FileFormat:=xlNormal
Application.Goto Reference:="R65536C1"
' If whole data file did not load then
If ActiveCell.Cells <> "" Then
' Open first data file to get any remaining data
' The STARTROW is the start of datafile being imported
Workbooks.OpenText FileName:=DataFile, _
Origin:=xlWindows, _
StartRow:=32767, _
DataType:=xlDelimited, _
ConsecutiveDelimiter:=True, _
Tab:=True, _
Space:=True, _
FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), _
Array(6, 1), Array(7, 1), Array(8, 1))
ActiveWorkbook.SaveAs FileName:="TempHalf.xls", _
FileFormat:=xlNormal
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.