+ Reply to Thread
Results 1 to 6 of 6

Is it possible to 'dump' an array into a column?

  1. #1
    Registered User
    Join Date
    01-10-2012
    Location
    us,florida
    MS-Off Ver
    Excel 2007
    Posts
    2

    Is it possible to 'dump' an array into a column?

    greetings,

    I am reading from a text file large amount of data and putting this into a array. I'd like to be able to 'paste' that array into a specific column within Excel. Is this possible?

    Right now I have a 'for' loop that that increments the array and copies the content into a cell which is not very efficient at times. I know this because I have a StatusBar that displays the row it's on, and at times, the display increments slower, especially when I have several Excel spreadsheets opened.

    I'm on office 2007.

    many thanks.
    cg
    Last edited by lacour; 01-11-2012 at 09:33 PM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Is it possible to 'dump' an array into a column?

    lacour
    Is it a txt file?
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    01-10-2012
    Location
    us,florida
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Is it possible to 'dump' an array into a column?

    Quote Originally Posted by pike View Post
    lacour
    Is it a txt file?
    I'm reading from a text file using VBA, the content of that text file is held in a vairable called sText

    Please Login or Register  to view this content.
    Once the content of the file is loaded into sText, I copy sText into an Array as such

    sArray = Split(sText, vbNewLine)

    then I parse scan the array row by row and write the content to each cell. This is the part I'd like to change. I would like to get away from parsing this through the loop and would prefer instead to write one statement that copies either sText or sArray() into the respective rows.

    Please Login or Register  to view this content.
    Last edited by pike; 01-13-2012 at 04:46 PM. Reason: add code tags for newbie

  4. #4
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Is it possible to 'dump' an array into a column?

    Could you not just import the file or open it directly?
    Good luck.

  5. #5
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Is it possible to 'dump' an array into a column?

    can you attach the text file?
    Many different ways and its easier if i have the file to play with

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Is it possible to 'dump' an array into a column?

    anyway with out look at the file

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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