Faster Way to Import Excel Spreadsheet to Array With ADO
I am trying to import and sort data from a large excel report into a new file using Excel 2007 VBA. I have come up with two methods so far for doing this: Have Excel actually open the file (code below), gather all data into arrays and output the arrays onto new sheets in the same file and save/close it. Public Sub GetData() Dim FilePath As String FilePath = "D:\File_Test.xlsx" Workbooks.OpenText Filename:=FilePath, FieldInfo:=Array(Array(2, 2)) ActiveWorkbook.Sheets(1).Select End Sub Use ADO to get all data out of the closed workbook, import the whole datasheet into an array (code below) and s
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.