Title: csv import: undefined function in StringHelper.php
Last modified: January 12, 2023

---

# csv import: undefined function in StringHelper.php

 *  Resolved [robertdil](https://wordpress.org/support/users/robertdil/)
 * (@robertdil)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/csv-import-undefined-function-in-stringhelper-php/)
 * Our history group’s table of hundreds of gravestones in TablePress derives from
   a spreadsheet. There’s now a few more graves (!) to be added to the spreadsheet,
   saved as CSV, but TablePress crashes on import, with an “undefinded function”
   error in StringHelper.php L473. I’ll add the full details below.
 * I was sure this would be my spreadsheet mistake, so to check I tried to import
   the old CSV spreadsheet from a year ago. Same error. Then a different XLS spreadsheet.
   Same error. Then XSLX. Same
 * One thing that has changed is of course TablePress – now on version 2.0.3, whereas
   a year ago my import was with a version 1.n.m.
 * Sehr geehrter Herr Bäthge .. zu Hilfe bitte!
 * Here are those full details:
 *     ```wp-block-code
       WordPress version 6.1.1Active theme: Twenty Seventeen pvhg (version 1.4)Current plugin: TablePress (version 2.0.2)PHP version 8.0.19
   
       Error Details=============An error of type E_ERROR was caused in line 473 of the file /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Shared/StringHelper.php. Error message: Uncaught Error: Call to undefined function TablePress\PhpOffice\PhpSpreadsheet\Shared\mb_convert_case() in /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Shared/StringHelper.php:473Stack trace:#0 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Spreadsheet.php(1049): TablePress\PhpOffice\PhpSpreadsheet\Shared\StringHelper::strToUpper()#1 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Worksheet/Validations.php(92): TablePress\PhpOffice\PhpSpreadsheet\Spreadsheet->getDefinedName()#2 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Worksheet/Worksheet.php(2758): TablePress\PhpOffice\PhpSpreadsheet\Worksheet\Validations::definedNameToCoordinate()#3 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Worksheet/Worksheet.php(1492): TablePress\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet->setSelectedCells()#4 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Cell/Cell.php(606): TablePress\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet->getStyle()#5 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Reader/Csv.php(408): TablePress\PhpOffice\PhpSpreadsheet\Cell\Cell->getStyle()#6 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Reader/Csv.php(354): TablePress\PhpOffice\PhpSpreadsheet\Reader\Csv->loadStringOrFile()#7 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Reader/Csv.php(268): TablePress\PhpOffice\PhpSpreadsheet\Reader\Csv->loadIntoExisting()#8 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Reader/BaseReader.php(166): TablePress\PhpOffice\PhpSpreadsheet\Reader\Csv->loadSpreadsheetFromFile()#9 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/classes/class-import-phpspreadsheet.php(176): TablePress\PhpOffice\PhpSpreadsheet\Reader\BaseReader->load()#10 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/classes/class-import-phpspreadsheet.php(61): TablePress_Import_PHPSpreadsheet->_import_phpspreadsheet()#11 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/classes/class-import.php(578): TablePress_Import_PHPSpreadsheet->import_table()#12 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/classes/class-import.php(469): TablePress_Import->_load_table_from_file_phpspreadsheet()#13 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/classes/class-import.php(95): TablePress_Import->_import_files()#14 /var/home/packingt/pvhg.uk/wordpress/wp-content/plugins/tablepress/controllers/controller-admin.php(992): TablePress_Import->run()#15 /var/home/packingt/pvhg.uk/wordpress/wp-includes/class-wp-hook.php(308): TablePress_Admin_Controller->handle_post_action_import()#16 /var/home/packingt/pvhg.uk/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()#17 /var/home/packingt/pvhg.uk/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()#18 /var/home/packingt/pvhg.uk/wordpress/wp-admin/admin-post.php(85): do_action()#19 {main} thrown
       ```
   
 * No hurry – but thanks in advance from Robert
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcsv-import-undefined-function-in-stringhelper-php%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/csv-import-undefined-function-in-stringhelper-php/#post-16369245)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * That error report is very helpful, thanks! From what I can see, this comes down
   to your server’s PHP version not having the “mbstring” PHP module/extension, 
   which is needed by TablePress for the import though. It looks like I need to 
   add another safeguard against this in the plugin code.
 * A better fix would be to enable this “mbstring” PHP module on your server (it’s
   actually recommended to have this by the WordPress developers). For that, you
   could check if your webhost’s configuration panel (something like “cPanel”) offers
   a configuration option for this. Alternatively, you could also ask your webhost’s
   support team to enable the “mbstring” PHP module on the server.
 * Best wishes,
   Tobias
 *  Thread Starter [robertdil](https://wordpress.org/support/users/robertdil/)
 * (@robertdil)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/csv-import-undefined-function-in-stringhelper-php/#post-16369574)
 * ![](https://i0.wp.com/pvhg.uk/wordpress/wp-content/uploads/Graveyard-images/20230113_PHP-
   mbstring-option.png?ssl=1)
 * Yay! “A better fix” – yes of course, the cPanel does offer this configuration
   option, in [ Software ==> Select PHP Version ]. Now enabled, the TablePress import
   works fine. THANK YOU!
 * Das ist ja wunderbar, erstaunlich, und auch so schnell! Vielen Dank!
 * Congratulations, Tobias, on an outstanding level of rapid technical support for
   your outstandingly-good TablePress plugin for WordPress. Very best wishes from
   Robert and from Packington Village History Group
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/csv-import-undefined-function-in-stringhelper-php/#post-16369847)
 * Hi,
 * yes, that’s exactly the one 🙂 Good to hear that enabling this worked!
 * Best wishes,
   Tobias
 * P.S.: In case you haven’t, please rate TablePress [here](https://wordpress.org/support/plugin/tablepress/reviews/#new-post)
   in the plugin directory. Thanks!

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

The topic ‘csv import: undefined function in StringHelper.php’ is closed to new 
replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/csv-import-undefined-function-in-stringhelper-php/#post-16369847)
 * Status: resolved