+ Reply to Thread
Results 1 to 5 of 5

Need help splitting a xlsx file

  1. #1
    Registered User
    Join Date
    10-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    3

    Need help splitting a xlsx file

    I have received an .csv file and saved this file as an .xlsx file because otherwise my Java program couldn't work with it.
    I don't have enough memory to work with the .xlsx file through Java (because the file is 19 MB).
    I would like to split the .xlsx file into several .xlsx without having to copy paste all of it.

    My Excel file looks like this:

    clip_image002.jpg

    clip_image002.jpg

    splitsen.png

    I would like to have a seperate file for each TRAIN_NUM. Is this possible and can somebody tell me how? (I have no experience with macro's.)
    Each TRAIN_NUM can have a different amount of rows and the TRAIN_NUMs are not always consecutive.
    Last edited by JilVW; 10-24-2013 at 05:30 AM.

  2. #2
    Registered User
    Join Date
    10-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Need help splitting a xlsx file

    Does anyone know the answer?

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Need help splitting a xlsx file

    Hi, JilVW,

    maybe you can adapt the code from http://www.excelforum.com/excel-prog...ml#post3404668 to suit your needs (you would need to work with Column B instead of Column A which means Autofilter would have to be applied on Column 2 instead of 1).

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    10-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Need help splitting a xlsx file

    Ok, I have used this code and changed it to the second column (A to B)

    Please Login or Register  to view this content.
    But when I run this, then I only get a file with one line in. I need a file for each train number with all the data from that train number (so not one, but several lines).
    Is it also possible to choose the name of the files that are generated?

    Thanks!
    Last edited by arlu1201; 10-24-2013 at 06:44 AM. Reason: Corrected code tags

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Need help splitting a xlsx file

    Hi, JilVW,

    if my Exccel could convert your pictures to worksheets I think I could figure out what is going wrong with the code. So maybe you can attach a worbook instead of pictures?

    Ciao,
    Holger

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 10-23-2013, 12:54 AM
  2. How to add the columns data of several xlsx files of a folder in another xlsx file
    By ravikumar00008 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-25-2012, 04:29 AM
  3. [SOLVED] Save xlsm file as xlsx file
    By ccpsc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-06-2012, 01:12 AM
  4. Converting a .xlsx file containing boxplots in to .htm file
    By shrimic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-19-2012, 10:16 AM
  5. Save workbook with multiple sheets as csv file and xlsx file
    By excel_vb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2010, 02:41 PM

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