NopCommerce Bulk Upload / edit not working at all. Getting 404 Error permanently.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 anos atrás
Hi Guys,
Im getting a 404 error when i do any bulk upload.
In the system log the 2 errors i got relating to this are:
1) An item with the same key has already been added. Key: _xlnm._FilterDatabase
2) Error 404. The requested page (/Admin/Product/ImportExcel) was not found

I think this error happened because i had first exported some products that had attributes (hidden rows which i didnt notice then)via admin panel bulk import, and then i reimported via admin panel bulk upload after i edited them.

Now my bulk upload feature seems to be permanently not working. Any solutions anyone ?
Bulk Upload is a critical feature for me in NopCommerce.

I am using NopCommerce version 4.10

Error Log:

Log level: Error

Short message:  
An item with the same key has already been added. Key: _xlnm._FilterDatabase

Full message:  
System.ArgumentException: An item with the same key has already been added. Key: _xlnm._FilterDatabase
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at OfficeOpenXml.ExcelNamedRangeCollection.AddName(String Name, ExcelNamedRange item)
   at OfficeOpenXml.ExcelNamedRangeCollection.Add(String Name, ExcelRangeBase Range)
   at OfficeOpenXml.ExcelWorkbook.GetDefinedNames()
   at OfficeOpenXml.ExcelPackage.get_Workbook()
   at Nop.Services.ExportImport.ImportManager.ImportProductsFromXlsx(Stream stream) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\ExportImport\ImportManager.cs:line 1160
   at Nop.Web.Areas.Admin.Controllers.ProductController.ImportExcel(IFormFile importexcelfile) in C:\andrei\nopcommerce\sources\src\Presentation\Nop.Web\Areas\Admin\Controllers\ProductController.cs:line 2174

IP address: 10.10.40.111
Customer: [email protected]
Page URL: https://www.fanmats.com/Admin/Product/ImportExcel
Referrer URL: https://www.fanmats.com/Admin/Product/List
Created on: 7/24/2019 6:45:41 AM

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Urgent Help Needed Anyone.

Thanks,
Varun
4 anos atrás
Nevermind I solved this.

Probably caused by one of the 2 issues.
1) I had forgotten to include the first column of bulk upload (ProductID) during bulk upload.
2) When i exported products, some Products had hidden rows because of attributes.


I deleted the last imported bulk upload batch in db. and reincluded the first productid column and did the bulk upload, and everything was fine.

Hope this helps anyone who gets into this situation.

Be sure to upvote if this helps.

Thanks,
Varun
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.