+ Reply to Thread
Results 1 to 2 of 2

Split or Insert Into Multiple Tabs or Sheets

  1. #1
    Registered User
    Join Date
    01-11-2007
    Posts
    1

    Split or Insert Into Multiple Tabs or Sheets

    Hey,

    I have a quick question (That will probably not have a quick answer).

    I'm trying to take a CSV file dump from some SQL and move it into Excel. From excel I want to split up certain chunks of this CSV file and move it into separate tabs/sheets. The tab/sheet names and the number of tabs need to be dynamic because we could have the SQL pulling more or less departments in each month (One tab per department)

    Any ideas?

    Thanks!!

  2. #2
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    A few options to consider.

    If you are certain that the entire data file will be less than 2^16 records (or 2^20 if using Excel 2007), then pull it directly into Excel and either
    1. use an autofilter to manually split it among sheets
    - or -
    2. use VBA (macro) to split it among sheets
    Then, delete the original sheet.

    If you are not certain that the entire data set will fit into one Excel sheet to begin with, then import it to Access, have access export one department at a time. You can Automate Access using Excel VBA if you want the user to interface only with Access.

    Or, use textstream object within Excel VBA to pull in one record at a time and direct it to sheet based on department field.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1