+ Reply to Thread
Results 1 to 12 of 12

Export matrix to single text

  1. #1
    Registered User
    Join Date
    05-08-2009
    Location
    Yogya
    MS-Off Ver
    Excel 2007
    Posts
    96

    Export matrix to single text

    This should be a piece of cake for you guys...

    Please Login or Register  to view this content.
    The code above will produce text files from a square matrix with the first column as the text file name,
    and the each row from the second row as the content of the corresponding title (from column 1).. e.g:



    Please Login or Register  to view this content.
    From that matrix we'll get :

    Please Login or Register  to view this content.

    Now i want to modificate the code so that it would create a single text file, with all the matrix cells as the content..
    (the title doesn't matter, as it's only one file) e.g:


    Please Login or Register  to view this content.
    I've been switching the "for.. next" in the code but i can't seem to get the right result

    thanks in advance.
    Last edited by Kb24; 09-03-2009 at 02:37 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Export matrix to single text

    Code tags, please ...
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    05-08-2009
    Location
    Yogya
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: Export matrix to single text

    Maybe it's better if i upload the file...

    First create "text" folder on your desktop, then
    Try running the attachment
    you'll get 3 text files :

    Please Login or Register  to view this content.
    Now all i want is to change the result into

    Please Login or Register  to view this content.
    thats it.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-08-2009
    Location
    Yogya
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: Export matrix to single text

    Anyone? I tried this but it didn't work, it seems to create endless loop ...

    Please Login or Register  to view this content.
    Any idea what went wrong?

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Export matrix to single text

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-08-2009
    Location
    Yogya
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: Export matrix to single text

    Appreciate our help.. but, That's the same with my first code right?

    It still makes 3 files for this matrix,

    Please Login or Register  to view this content.
    which are :

    Please Login or Register  to view this content.
    I want it to be one Single text file, containing All cells in the matrix

    like this :
    Please Login or Register  to view this content.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Export matrix to single text

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    05-08-2009
    Location
    Yogya
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: Export matrix to single text

    Edit: wait a sec..
    Last edited by Kb24; 09-04-2009 at 07:07 PM.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Export matrix to single text

    You must be looking at old files, or running the wrong code.

    That code only makes one file, Single.txt

  10. #10
    Registered User
    Join Date
    05-08-2009
    Location
    Yogya
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: Export matrix to single text

    Hmmm.... It's been 3 hours already and the process is still not finished...
    I'm using it for a 1044x1044 matrix..

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Export matrix to single text

    How big are the cell entries?

    If they are one character each, you're creating a 1MB string.

    Are you sure you want to write all that as a single string? And if so, why?
    Last edited by shg; 09-05-2009 at 01:00 AM.

  12. #12
    Registered User
    Join Date
    05-08-2009
    Location
    Yogya
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: Export matrix to single text

    1044x1044 cells = 1089936.. (4 characters each cell)
    and yes i want all of them in 1 text file..
    I used Txtcollector but it still creates spaces between text files..
    Maybe using array can speed it up?

+ 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