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 7787077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:33:04+00:00 2026-06-01T20:33:04+00:00

Using VBA, I need to unpivot data that is currently in delimited text files

  • 0

Using VBA, I need to “unpivot” data that is currently in delimited text files (as hundreds of columns by tens of thousands of rows) into a normalized form (four columns by millions of rows); that is, the resulting table will comprise columns that, for each cell:

  • identify the original table/file;
  • identify the cell’s row in the original table;
  • identify the cell’s column in the original table;
  • contain the value of that cell.

I would generally be grateful for any thoughts on how one can efficiently accomplish this task.

So far, I have considered using ADODB to construct a SELECT INTO ... UNION ... query that builds the output table, but the default text file providers are sadly limited to 255 columns (are there any which aren’t?).

Sébastien Lorion has built a terrific Fast CSV Reader, which I would love to use, but I do not know how to use it from within VBA – grateful for any thoughts (I don’t think it has been compiled to export COM interfaces, and I don’t have the tools to recompile it). For that matter, Microsoft also provide a TextFieldParser class, but again I do not know if/how this can be used from VBA.

Another approach might be to have Excel >=2007 open the source file and construct the output table from there, but that intuitively ‘feels’ as though it will incur considerable wasted overhead…

  • 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-06-01T20:33:05+00:00Added an answer on June 1, 2026 at 8:33 pm

    I decided to build a tiny COM-aware wrapper around TextFieldParser in VB.NET. Not ideal, but the best I can come up with at present.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know of several approaches using a macro (VBA) to show/hide columns and rows
I need to read table of data as in picure using vba. I used
I'm using VBA to sort columns in Excel 2003. I need to sort by
I am working on a procedure in Excel using VBA that highlights duplicate rows.
In an Excel VBA project, I need to read and write UTF-8-encoded text files.
I need to crop an image on a Powerpoint slide using VBA - in
I basically want to open a browser window from Word using VBA that does
Hi I'm using VBA in Excel and need to pass in the values from
I need to get all of the column names of a table using VBA
Hey. I urgently need some help on building up a complete table using VBA.

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.