im trying to update some products using bulk import excel- but hitting the following error when i try to import
Object reference not set to an instance of an object.
the full error log:
System.NullReferenceException: Object reference not set to an instance of an object. at Nop.Services.ExportImport.Help.PropertyByName`1.get_IsCaption() in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\ExportImport\Help\PropertyByName.cs:line 197 at System.Linq.Enumerable.All[TSource](IEnumerable`1 source, Func`2 predicate) at Nop.Services.ExportImport.ImportManager.GetTypeOfExportedAttribute(ExcelWorksheet worksheet, PropertyManager`1 productAttributeManager, PropertyManager`1 specificationAttributeManager, Int32 iRow) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\ExportImport\ImportManager.cs:line 163 at Nop.Services.ExportImport.ImportManager.PrepareImportProductData(ExcelWorksheet worksheet) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\ExportImport\ImportManager.cs:line 945 at Nop.Services.ExportImport.ImportManager.ImportProductsFromXlsx(Stream stream) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\ExportImport\ImportManager.cs:line 1184 at Nop.Web.Areas.Admin.Controllers.ProductController.ImportExcel(IFormFile importexcelfile) in E:\Others\Nop4.2 Clean With Search in Description\src\Presentation\Nop.Web\Areas\Admin\Controllers\ProductController.cs:line 2280
Export one product in an excel file and then import that excel file to make sure it is all working Then you have the format that works - make sure your file is the same format
hi there thanks for the reply. Yes i have tried this. still the same error. I exported the products made some changes to meta keywords and description and i guess this is where the error lies. do you know is there a character limit in these fields? thanks !
Looking at the Import routine I can not see any length limits. Looking at the database fields for Product you dont want to exceed that TABLE [dbo].[Product] [Name] [nvarchar](400) NOT NULL, [MetaKeywords] [nvarchar](400) NULL, [MetaTitle] [nvarchar](400) NULL, [Sku] [nvarchar](400) NULL, [ManufacturerPartNumber] [nvarchar](400) NULL, [Gtin] [nvarchar](400) NULL, [RequiredProductIds] [nvarchar](1000) NULL, [AllowedQuantities] [nvarchar](1000) NULL,