I have created category and subcategory and try to upload products to those category and subcategory with csv file but the proble is again it is creating category and subcategory.
Hi @sekhar_n
Please confirm if you are using import behavior ADD/Update while uploading products into Magento 2.
Also, check that you are using categories path in your categories column in the CSV file. In case you have multiple categories for your products, you can use values separated by , and set , in Multiple value separator filed in Import behavior at the time of import CSV.
For example: Your vales under categories column should be like this.
DefaultCategory/category1,DefaultCategory/category2,DefaultCategory/category1/category3/category4
I hope it will help you. Let me know if you have any concern.
If you find this helpful, please Accept as solution and provide Kudos.
Thanks