I am working on a project where I have a text file that has all our order and shipping data into one page. Order numbers are being exported to a system. This system doesn't work with comma separated values. It has a stringent spacing system, i.e. it uses fixed column widths for the order data. There must be a header and trailer record.
For example an order for a rubber ball would basically look like this:
The header data in CSV must be separated by the actual number position in the file. Here's an example of the header lines in CSV:
Original CSV example:
The file to export must follow a format like this:
After the header comes the item #, number ordered, price, etc. would look like this:
So the header and item would look something like this:
Throw in the trailer record and now I have a headache.
Final result for 1 record is this:
I know UEStudio is powerful enough to do this, just looking for some direction on the best place to get it done.
Thanks in advance!
For example an order for a rubber ball would basically look like this:
Code: Select all
header
BALL5323
trailer
Original CSV example:
Code: Select all
Order, item, customer name, address, order date
1234, widget, Walmart, 123 street,11/11/2018
1235, chair, IKEA, 124 street, 11/15/2018
- Order number is in columns 1-11 with leading zeros.
- Item name is in columns 12-22.
- Customer name is in columns 23-40.
- Address is in columns 41-65.
- Order date must be converted to date format YYYYMMDD and is in columns 66-74.
Code: Select all
00000001234widget Walmart 123 Street 20181111
00000001235chair IKEA 124 Street 20181115
Code: Select all
BALL5323 23 0233
Code: Select all
item number number ordered price ( 2.33/each in example below)
00000001234balls Walmart 123 Street 20181111
BALL5323 23 0233
Code: Select all
number shipped, comments, purchase#, ship method, invoice total
23 they bounce 752539 FedEx 0005359
Code: Select all
00000001234balls Walmart 123 Street 20181111
BALL5323 23 0233
23 they bounce 752539 FedEx 0005359
Thanks in advance!