Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 -- RobToo ------------------------------------------------------------------------ RobToo's Profile: http://www.excelforum.com/member.php...o&userid=30558 View this thread: http://www.excelforum.com/showthread...hreadid=502094 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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" wrote in message ... 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coverting a txt file to multiple Workbooks
Thanks Tom. I'll try it out and see what I come up with. -- RobToo ------------------------------------------------------------------------ RobToo's Profile: http://www.excelforum.com/member.php...o&userid=30558 View this thread: http://www.excelforum.com/showthread...hreadid=502094 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
multiple workbooks in one file | Excel Discussion (Misc queries) | |||
coverting Lotus 123 file with thousands of hyperlinks | Excel Discussion (Misc queries) | |||
Updating Workbooks from multiple links Workbooks | Excel Worksheet Functions | |||
Combine multiple workbooks into 1 workbook w/ multiple worksheets | Excel Discussion (Misc queries) | |||
Combine multiple workbooks into 1 workbook w/ multiple worksheets | Excel Discussion (Misc queries) |