Coding to take XLSX files from a directory, partial cross map with a XLSX and create one CSV file for upload to a sales system.
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

We have a customer who provides their orders in single XML files daily.
We want some code that takes these multiple XML files out of a directory, cross maps some fields with a master XLSX and then creates a correctly populated single CSV that can be uploaded to our sales system.

What a bag of balls!
BEHEMOTH01 4 months ago
@BEHEMOTH01 did you find a solution to this, if not, drop a comment here and i will share my solution....
mashtullah 1 month ago
4 months ago

Crowdsource coding tasks.

1 Solution


Hellow BEHEMOTH01,

Here is the script written in PHP, you can use this i command line.

Source Code Link: https://we.tl/t-vr4kD4YGyf

Usage:

1.Download and extract the files.
2.Place the files you want to combine in the [in] folder.
3.Run the command: php index.php

Note:
The mapping file you have shared is saved on [./mappings] folder.

I am creating a web application next and i will share the sources too.

A web app would be useful. Also, each ORDER_NUM only needs 1 output order number. E.g. 3 x lines on one invoice.
BEHEMOTH01 4 months ago
Also the product code was not mapping correctly. I have updated the database, this should be able to be cross referenced. FAN (input) Product Code (output)
BEHEMOTH01 4 months ago
Hi, thanks for the feedback. I will work on the suggested changes. Kind regards.
evancejaye 4 months ago
Hi there, i cant find the FAN field on the sample invoice. Is there an updated one?
evancejaye 4 months ago
Based no my deduction, I have mapped the Product Code with CUSTOMER_PRODUCT. If there is anything that needs to be changed we can fix it.
evancejaye 4 months ago
CUSTOMER_PRODUCT not FAN. My mistake. Thx
BEHEMOTH01 4 months ago