The order of the products in the CSV you get from the export is done on the product_id.
All items are sorted by product ID
This image bias_silk_ribbon-1410001.jpg has a Product Name of Bias Silken Ribbon - 1410 The SKU is BSR-1410
All items are of a similar format
The order of the products in each category when you import a CSV of products depends on how the CSV is done and if you already have the products in your shop.
I ended up deleting all the items in the shop, following an export.
I then cleaned up the order and all the random additions and incorrect image references
The order is based on Category / Item ID
Import back in and things are broken.
If you already have the products and don't provide the categories columns in the CSV, then the order of the products in the categories won't change.
But if you keep these columns, then the ordering of the products in each category will be based on the position of the product in the CSV so it might be different to what you had in your shop.
All items are sorted in order of category. The categories each have an ID number as per categories_ordering
The items within that category are then sorted according to their colour ID/Name/an image name as indicated above
So what we have is all of these in alignment ... product_name/product_code/product_id/image naame-id
Ok where I'm at is the shop is functional.
I just exported the CSV to check what comes out
OMG ... some images have only the image name and location folder reference, while others have multiple images, when there are none, while others have no images referenced when the image appears on the site.
Sadly I won't ever be using the import/export tool given the collective 14 hours of time that should have been only about 40 minutes maximum. For a large shop/store this is a big fallover.