Hyde here from Shopify. Great question!
When using a CSV file there are certain rules for each column. The Title column, for example, must not have any blank or missing fields. So if your product has variants, the idea is to use the dedicated column for that Variant Inventory Qty:
There are also option columns that you can use to help categorize the variants:
This is all outlined in this help document on CSVs which I think you will find most helpful. Of course, if you have any questions about this or anything else, please feel free to get back to me!
All the best, Hyde.