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

  • Home
  • SEARCH
  • 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

I have 250.000 files all in one directory. The files are all in the
I have a set of csv files (around 250), each having 300 to 500
I have a table with 250 columns. I'm trying to Select all columns, but
Suppose I have a set of commits in a repository folder... 123 (250 new
I need to use Memory-Mapped Files to implement some virtual file system in c.
I wonder if my .htaccess file is too long/inefficient? I have about 250 lines
I have a table with the following structure: id int(11), name varchar(250) I have
I have made the following sample user control: <UserControl x:Class=DLSAdministration.Controls.CombinedTextBoxControl xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:d=http://schemas.microsoft.com/expression/blend/2008 xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006
I have an image with dimensions 250*70 pixels under drawable folder (I'm just starting
If I have about 250 entries with 6 columns in a MySQL database, and

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.