Title: Import from spreadsheet, bug?
Last modified: June 21, 2022

---

# Import from spreadsheet, bug?

 *  Resolved [masterida](https://wordpress.org/support/users/masterida/)
 * (@masterida)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/import-from-spreadsheet-bug/)
 * It seems that the **import from spreadsheet** function is not working anymore.
 * Please check `Functions/Update_Admin_Databases.php` line 198 (Changeset 2348570).
   I don’t think that you should sql escape the values string, as there are single
   quotes in this string. They would be escaped and then the sql query fails.
 * Possible workaround:
 *     ```
       		$ValuesString = implode("','", esc_sql($Values));
       		$wpdb->query(
       			$wpdb->prepare("INSERT INTO $ewd_feup_user_table_name (" . esc_sql( $FieldsString ) . ", User_Date_Created) VALUES ('" .  $ValuesString . "','%s')", $Today)
       		);
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [jaysupport](https://wordpress.org/support/users/jaysupport/)
 * (@jaysupport)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/import-from-spreadsheet-bug/#post-15758043)
 * Hi ida,
 * I just tested the import in the newest version of the plugin and it is working
   correctly.
 * Could you please try using the following example sheet?
 * [https://www.etoilewebdesign.com/Screenshots/feup_import.xlsx](https://www.etoilewebdesign.com/Screenshots/feup_import.xlsx)
 * Just make sure you first have Username is Email disabled and that you have fields
   for First Name, Last Name and Email.
 * If that still doesn’t work, then could you please share your spreadsheet with
   me?
 * Thanks!
 *  Thread Starter [masterida](https://wordpress.org/support/users/masterida/)
 * (@masterida)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/import-from-spreadsheet-bug/#post-15759079)
 * Your file does work indeed. But as soon as I add a new column with the label “
   Password”, then the import fails. The problem I guess is not in custom fields.
   It just happens if you add “core user info” like password, level, email confirmed
   and so on.
 * The message I get from wordpress is
 *     ```
       WordPress-Database-Error: [Column count doesn't match value count at row 1]
       INSERT INTO wp6_EWD_FEUP_Users (Username,User_Password, User_Date_Created) VALUES ('jandoe\',\'$2y$13$a8e75601ef03f1cc5df34OvtJe2i/PMqB6A43cZrpk5LcAruk65Zi','2022-06-22 06:13:00')
       ```
   
 * There is an extra escape-character before the trailing single quote of the username
   and before the leading single quote of the password hash. I think, that they 
   should not be escaped though.
    -  This reply was modified 3 years, 11 months ago by [masterida](https://wordpress.org/support/users/masterida/).
 *  Plugin Support [jaysupport](https://wordpress.org/support/users/jaysupport/)
 * (@jaysupport)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/import-from-spreadsheet-bug/#post-15765720)
 * Hi ida,
 * We’ve released an update that corrects this issue.
 * Thanks for your help!
 *  Thread Starter [masterida](https://wordpress.org/support/users/masterida/)
 * (@masterida)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/import-from-spreadsheet-bug/#post-15766771)
 * You’re welcome.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Import from spreadsheet, bug?’ is closed to new replies.

 * ![](https://ps.w.org/front-end-only-users/assets/icon-128x128.png?rev=1805921)
 * [Front End Users](https://wordpress.org/plugins/front-end-only-users/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/front-end-only-users/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/front-end-only-users/)
 * [Active Topics](https://wordpress.org/support/plugin/front-end-only-users/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/front-end-only-users/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/front-end-only-users/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [masterida](https://wordpress.org/support/users/masterida/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/import-from-spreadsheet-bug/#post-15766771)
 * Status: resolved