Hi,
I'm just starting a new project and thought that asking for advice on an approach at the beginning might well save me a headache later on when I hit a brick wall and am told, "you could have done it this way much easier!".
So, the task is this...
Every time we fulfill an order, We produce a label for every pallet that is sent out the door for that order. The label is a set template, created in Excel, and has around 12 fields which must be filled in for every pallet. At the moment this is done manually, which is both time consuming and has potential for human error!
An order sheet will come in, which will have a list from pallet 01 to pallet xx. Each pallet will have the 12 fields filled out.
PHP Code:
Pallet Product Field1 Field2 Field3 Field4 .... Field12
1 Staples 01012 10 480 01 ..... 5
2 Glue 01022 50 50 05 ..... 6
3 Pencils 01024 25 200 10 ..... 3
4 Ruler 01026 100 50 01 ..... 1
5 Set square 01031 1 100 05 ..... 0
. .
. .
30 Pens 01112 10 200 01 ..... 5
For every pallet, I need to create a new label from the master, and populate it with the info from the list.
On completion, I will have an excel workbook with multiple sheets - in the case of the example above, there will be 30, which will be ready to be printed off as labels
In my mind, I envisage taking this input file, saving it to memory as an array or table (note mix of digits and characters), and then being able to close the input file (rather than hopping back and forward between that and the output file). Previously, I would have created a macro to copy and paste it into the output file and then hop back and forward from the worksheet to the relevant label, copying and pasting. This just seems inefficient! I really want to do this once and absorb all data as a clean exercise!
Once data has been stored, I wish to complete the first label (for the first pallet) using row 1 from the table.
It will then simply be a case of incrementing down a row in the stored table, and using all the information in row 2 to create the label for pallet 2.
Then continue this until all 30 labels have been created.
The bit I am struggling with is realising the table creation, from there I understand how to progress! - I don't know if
a) This is something that is easily done in Excel
b) This is the best strategy.
Would really appreciate input on this!
Here's that table again in case it didn't come out correctly above...
Pallet Product Field1 Field2 Field3 Field4 .... Field12
1 Staples 01012 10 480 01 ..... 5
2 Glue 01022 50 50 05 ..... 6
3 Pencils 01024 25 200 10 ..... 3
4 Ruler 01026 100 50 01 ..... 1
5 Set square 01031 1 100 05 ..... 0
. .
. .
30 Pens 01112 10 200 01 ..... 5
Bookmarks