vba - Data extraction with Excel -


I get 100+ Excel spreadsheets from the monthly, so that I get a certain category and in another spreadsheet to create a report I can paste.

I am trying to write a VBA script to iterate my Excel files and copy the range in a spreadsheet, but I am able to do this.

Is there an easy way to do this?

I wrote this year ago, but it may be helpful to you. I have added the extension for the latest version of Excel (xlsx) seems to work.

  Sub MergexLedox () as the final framework, the integer dim docpath string in the form of slow base as the Excel.range version as the sysObj, as the folder oz variable, the file object Version as application ScreenUpdating = False docPath = Application.GetOpenFilename (FileFilter: = "Text files (* .txt), * .txt, Excel files (* .xls), * .xls, Excel 2007 files (* .xlsx), * .xlsx" , FilterIndex: = 2, Title: = "Select any file") Workbooks. Set Base = Set Category ("A1") set sysObj = CreateObject ("scripting.filesystemobject") Set file obz = sysObj.getFile (docPath) folder obz = file obz. Parent Folder Folder OBJE Fillies Workbook in each file obz. Open filename: = file obese. Seat range (category ("A1"), Active Special, Seals (XLLSTEL)). Copy LastList = Base Cell Special Seals (XLLSTEL) .Oo Basel Offset (final cry, 0). Paste Special (XLPistival) Basel. Close: Communication: = false next ending sub  

edit:

I should mention how it works. When you start the macro, it brings an open file dialog. Double-click the first file in the list (or any file for that matter). This will create a new workbook to loop through all the files in the folder. For each file, it copies all the contents from the first worksheet and pastes it at the end of the new workbook. It's too much to have everything in it.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -