Black Friday Sale!
Save up to 50% off any plans! Valid from 23 Nov to 30 Nov - Also valid for the existing customers
Open Closed

Import Users from Excel Throws Null Exception #9834


0
BigCDogCrew created

AspNetZero 7.2 MVC / jQuery.

I seriously hope I'm not doing something stupid-easy and wasting your time with this one, but I just don't see it.

When attempting to import users from an excel spreadsheet, the individual user records are rejected with a "Nullable object must have a value" error. Then, the try-catch builds the list of these invalid users and when attempting to publish the notification fails again with the same error.

Here are the records in the import file. <br> | UserName* | Name* | Last Name* | EmailAddress* | PhoneNumber | Password* | AssignedRoleNames (comma separated) | | --------- | ----- | ---------- | ------------- | ----------- | --------- | ----------------------------------- | | Mickey | Mickey | Mouse | mickey@email.com | 2342342345 | 123qwe | User | | Minnie | Minnie | Mouse | minnie@email.com | 2342342346 | 123qwe | Admin | | Donald | Donald | Duck | donald@email.com | 2342342347 | 123qwe | User | | Daisy | Daisy | Duck | daisy@email.com | 2342342348 | 123qwe | Admin | | Scrooge | Scrooge | McDuck | mcduck@email.com | 2342342349 | 123qwe | Admin | <br> Here are the two images of the locations where the errors are occurring.


3 Answer(s)
  • 0
    zony created
    Support Team

    Hi BigCDogCrew, Can you share imported Excel files? I need this file for testing, thanks.

  • 0
    BigCDogCrew created

    Files have been sent via email.

  • 0
    zony created
    Support Team

    Hi BigCDogCrew, I used the Excel file you provided to import and it worked. Have you changed the import related code, if possible, can you share a simple Demo project?