+ Reply to Thread
Results 1 to 3 of 3

Coverting a txt file to multiple Workbooks

  1. #1
    Registered User
    Join Date
    01-17-2006
    Posts
    2

    Coverting a txt file to multiple Workbooks

    Hello. I have a question I hope someone could help me with. I'm not a programmer but I know a little to navigate to enter code and such if need be.

    So my situation is this.

    I have a program that when I run a report I can either print a hard copy and fax it manually or save the report as a Txt file. If I use the Txt file I have to go into excel and save it as an xls file so I can then e-mail it and the recipient can sort and do what ever with it.

    The report can consist of one location per report or multiple locations with various information. It could range from 1 page to 50 or more pages. The location is the only value that is unique to each location. As of now if I save the txt file with say 20 locations and open it in excel it puts everything on one worksheet and the only way to separate them is finding when the next new location comes up as a break.

    So my question is this. Is there a way once I save the txt file to open excel run a macro that would open it up into one sheet then find the breaks by every new location and create new workbooks with just that info on it and save it to a particular dir on the HD with the file being the name of the location. Then I could go into Outlook and then go to that folder and attach that file to the e-mail and send it off?

    Is this possible?

    If anything needs clarified please ask?

    Thanks for your help.

    Rob

  2. #2
    Tom Ogilvy
    Guest

    Re: Coverting a txt file to multiple Workbooks

    the code here will do most of what you want:

    http://www.rondebruin.nl/copy5.htm

    You should be able to enrich it from the examples to achieve all that you
    want. Basically bring the whole text file into a workbook, then use the
    techniques at the above link.

    --
    Regards,
    Tom Ogilvy

    "RobToo" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hello. I have a question I hope someone could help me with. I'm not a
    > programmer but I know a little to navigate to enter code and such if
    > need be.
    >
    > So my situation is this.
    >
    > I have a program that when I run a report I can either print a hard
    > copy and fax it manually or save the report as a Txt file. If I use the
    > Txt file I have to go into excel and save it as an xls file so I can
    > then e-mail it and the recipient can sort and do what ever with it.
    >
    > The report can consist of one location per report or multiple locations
    > with various information. It could range from 1 page to 50 or more
    > pages. The location is the only value that is unique to each location.
    > As of now if I save the txt file with say 20 locations and open it in
    > excel it puts everything on one worksheet and the only way to separate
    > them is finding when the next new location comes up as a break.
    >
    > So my question is this. Is there a way once I save the txt file to open
    > excel run a macro that would open it up into one sheet then find the
    > breaks by every new location and create new workbooks with just that
    > info on it and save it to a particular dir on the HD with the file
    > being the name of the location. Then I could go into Outlook and then
    > go to that folder and attach that file to the e-mail and send it off?
    >
    > Is this possible?
    >
    > If anything needs clarified please ask?
    >
    > Thanks for your help.
    >
    > Rob
    >
    >
    > --
    > RobToo
    > ------------------------------------------------------------------------
    > RobToo's Profile:

    http://www.excelforum.com/member.php...o&userid=30558
    > View this thread: http://www.excelforum.com/showthread...hreadid=502094
    >




  3. #3
    Registered User
    Join Date
    01-17-2006
    Posts
    2

    Re: Coverting a txt file to multiple Workbooks

    Thanks Tom. I'll try it out and see what I come up with.

+ 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