excel import error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
hi all
I exported my product and with no changes, deleted my products from site and now I want to export that excel file I've exported.
but I get this error:
Sequence contains no matching element

I just exported and imported it.
so what's the problem whit it?
5 years ago
When you delete the products, they are soft deleted (i.e. the column Deleted is set of 1). You should try by performing a hard deletion from database and then try again.

Hope that helps.
Best Regards,
Anshul
5 years ago
RoastedBytes wrote:
When you delete the products, they are soft deleted (i.e. the column Deleted is set of 1). You should try by performing a hard deletion from database and then try again.

Hope that helps.
Best Regards,
Anshul


Thanks a lot Anshul.
I deleted them from SQL Database. but that error is still here :(
5 years ago
If you deleted all the products with SQL, then what is it you are trying to export now?  (there are no products - the export will be empty except for column headers)

(In general, you should NOT use SQL to delete products, because old Orders can still reference those products.)
5 years ago
New York wrote:
If you deleted all the products with SQL, then what is it you are trying to export now?  (there are no products - the export will be empty except for column headers)

(In general, you should NOT use SQL to delete products, because old Orders can still reference those products.)


thanks for the reply.
I wanted to delete the site, and exported before deleting them just to have backup. now I'm importing them to run my store again.
excel file is not empty
5 years ago
sepantamy wrote:
hi all
I exported my product and with no changes, deleted my products from site and now I want to export that excel file I've exported.
but I get this error:
Sequence contains no matching element

I just exported and imported it.
so what's the problem whit it?


my bad
I mean "I want to import that excel file I've exported."

sorry
5 years ago
Please check your log Admin > System > Log, find the error and paste the details here, so we can look at it further.

Regards,
Anshul
4 years ago
hi all
I created my category and product and then, deleted my category and products from site and now I created category and I want to export products excel file .
but I get this error:
category with the same name are not supported
thank you all
4 years ago
NOP 4.2 I am trying to import a small amount of products with excel sheet and I cannot figure out why I keep getting error.
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(DbContext _, ValueTuple`2 parameters)
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable`1 commandBatches, IRelationalConnection connection)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IReadOnlyList`1 entriesToSave)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
   at Nop.Data.EfRepository`1.Update(TEntity entity) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Data\EfRepository.cs:line 142
4 years ago
RE: "SqlException: String or binary data would be truncated."

Look for one or more of your excel cells exceeding the width of the corresponding database column, like a Name, Sku or GTIN over 400 chars.

I've never used the excel import, but I imagine it's handling categories, images, and attributes, etc too, so that's a lot of columns to search.  I would start with 1 product at a time until you find the first that definitely fails.  Then use excel formulas on that 1 failed product to determine the guilty cell,  and truncate or handle as necessary for the remaining products in a final import.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.