Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3216756
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:19:54+00:00 2026-05-17T15:19:54+00:00

I have 250 Microsoft Excel (.xls) files, all in a folder. I need to

  • 0

I have 250 Microsoft Excel (.xls) files, all in a folder. I need to do the following:

for each file:
    open the file
    switch to a specific tab in the file
    extract the text from rows 15-100 on that tab
    save the text in a text file somewhere

I assume this can be automated somehow, but I have no idea how. Where do I start looking to figure out how to do this? I really don’t want to open 250 excel files and copy text out by hand, as that would take hours. 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:19:55+00:00Added an answer on May 17, 2026 at 3:19 pm

    Since you already have Excel, you can create an Excel macro in a separate worksheet to do this; just make sure the worksheet is outside of the directory you are parsing. You’ll need to add a reference for the FileSystemObject, which should be found in C:\Windows\System32\scrrun.dll.

    Option Explicit
    
    Sub ExtractData()
        Dim fso As New FileSystemObject
        Dim oFile As File
        Dim oFolder As Folder
    
        Dim sFileOutput As String
        Dim fNum
    
        Dim excelFile As Excel.Workbook
        Dim excelWorksheet As Excel.Worksheet
        Dim i As Integer
    
        sFileOutput = "C:\FolderToScan\ExcelOutput.txt"
    
        Set oFolder = fso.GetFolder("C:\FolderToScan")
    
        For Each oFile In oFolder.Files
            If Right(oFile.Name, 3) = "xls" Then
                fNum = FreeFile()
                Open sFileOutput For Append As fNum
    
                Set excelFile = Workbooks.Open(oFile.Path)
    
                Set excelWorksheet = excelFile.Sheets(1)
                'Or:
                ' Set excelWorksheet = excelFile.Sheets("Name of your sheet")
    
                For i = 15 To 100
                    Write #fNum, excelWorksheet.Cells(i, 1)
                Next
                Close #fNum
    
                excelFile.Close
                Set excelFile = Nothing
            End If
        Next
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a set of commits in a repository folder... 123 (250 new
I have a huge database with some 100 tables and some 250 stored procedures.
I have a large set of data (a data cube of 250,000 X 1,000
Taken from Microsoft documentation: By default, the thread pool has 250 worker threads per
I have a DataTable populated with 250,000 records with 5 columns, I am iterating
I have table with the column name displayorders with values 1 to 250 and
I currently have a fairly straight forward UI which displays three 250 x 180
I have a file, the text format is like this: .640 .070 -.390 -.740
i have a input tag which is non editable, but some times i need
Let say I have the following desire, to simplify the IConvertible's to allow me

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.