• Just in case anyone else has this issue, or it inspires an extension:
    Having many tables that I need to import and replace occasionally, doing this with a single Zip file is great. As I understand it the multiple table Zip import for TablePress relies on the csv files having the same name as the tables.
    I name my tables all with a standard naming format eg Table0044.csv has id 44 in TablePress. To use the multiple table Zip import I have modded controllers\controller-admin.php, replacing
    $existing_table_id = ( isset( $existing_tables[ $file_name ] ) && 1 === count( $existing_tables[ $file_name ] ) ) ? $existing_tables[ $file_name ][0] : false;
    by
    $existing_table_id = ((substr($file_name,0,5)==='Table') && (substr($file_name,-4) === '.csv')) ? ltrim( substr($file_name, 5, 4), '0') : false;

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    indeed, if one currently wants to import multiple tables from a ZIP file AND replace existing tables, the table name has to match the file name.
    Your approach is also interesting. Thanks for sharing this!

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘Multiple table imports mod’ is closed to new replies.