Dos batch file

billgilmer

New Member
Joined
Dec 30, 2004
Messages
11
:banghead: I am trying to retrieve data from a binary text file and import to a CSV file. I have over 100 storeinv files each week and I want to use this information in an excel file.
I can open the file in excel but each line is one cell.
:pray:
The file name is
STOREINV.TXT
The info I want to retrive is The Store number, Invoice: Number
Invoice Date:, Total Net Rentals amount, Subtotals, and Minus & Voids.

499 S. Phoenix
New Storessss, Texas 77777
(321) 521-6428


TO: 1111 Documenr Invoice: 11943
3826 ###AM$$$ SCHOOL RD. Date: 12/27/04
3333 444444 TX 86111

+--------------------------------------------------------+
¦AMOUNT¦ DESCRIPTION ¦UNIT COST¦ TOTAL ¦
+------+-----------------------------+---------+---------¦
¦ ¦ Total Net Rentals for ¦ ¦ ¦ 1,278¦58¦
+------+-----------------------------+------+--+------+--¦
¦ ¦ 12/17/04 thru 12/23/04 days ¦ ¦ ¦ ¦ ¦
+------+-----------------------------+------+--+------+--¦
¦ ¦ Plus Manual Contracts ¦ ¦ ¦ 0¦00¦
+------+-----------------------------+------+--+------+--¦
¦ ¦ Minus Voids ¦ ¦ ¦ 33¦49¦
+------+-----------------------------+------+--+------+--¦
¦ ¦ Subtotal ¦ ¦ ¦ 1,245¦09¦
+------+-----------------------------+------+--+------+--¦




[/code] :pray:
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi

This solution will still need some manual correction, after you have opened your text file in excel you can convert it from "Text to Columns" from the Data menu.

If you add "¦" as a separator and play with the other options, you'll be able to make it a bit tidier.

As you're text's formatting may well be lost or different to what was posted, I couldn't say for certain, however post me your email address in a private message and if you want, I might be able to do some code using searching for strings and see what that comes up with.

HTH

John
 
Upvote 0

Similar threads

Forum statistics

Threads
1,224,830
Messages
6,181,229
Members
453,026
Latest member
cknader

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top