Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Excel worksheet To text format file with the fixed position

Status
Not open for further replies.

noorani

Programmer
Dec 11, 2002
46
FR
Hi, i have a wroksheet and i want to export it in the text format file, with the fixed position and length in the
text file.

My worksheet contain. 2 parts of information. Clients and Inventory. every cleint have a unique number. and every product have a unique code.

In the text file i want to export the data in this manner that first the inventory informtaion will be exported in order, then the clients data.

How can i solve this problem?.

what i'm doing is just printing out and re inputing the data in the Access Database, and from the Access database i'm exporting the data in the text file format using the report. but it is very long procedure, i guess there must be a solution to directly send data to text file in the same order as i'm doing for Access database.



here is the example of my worksheet.

Excel
=====
005 001 003
Product SoldQuantity Inventory Client-1 Client-2 Client-3
======= ============ ========= ======== ======== ========
ABC 6 3 4 2

XYX 7 2 4 2 1

T41 5 4 2 3


Now i want to export it in the text format file..

here is the text file should look like.

TextFile
========
Sold-Quantity Inventory
ABC 6 3
XYZ 7 2
T41 5 4


Client-1 005
============
ABC 4
XYZ 4
T41 2

Client-2 001
============
ABC 2
XYZ 2
T41 3

Client-3 003
============
XYZ 1



Please give me any idea how can i solve this task.
 
See the posts in thread68-441459.

You could write a macro that hides all columns except two at a time, then save as .prn file. Loop until all detail columns have been processed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top