AdminerTsvToSql
is a plugin for Adminer database tool that allows to insert data directly from Excel/OpenOffice/LibreOffice/etc using clipboard by automatically converting clipboard TSV (tab separated values) to SQL INSERT query.
This is much more useful than saving and uploading CSV files.
Allows copying/pasting TSV table data (from Excel, LibreOffice, etc) into Adminer SQL query field; Automatically detects TSV format and converts data into SQL query. First row should contain column names.
Plugin for Adminer database tool (http://www.adminer.org/).
Select and copy cells from Excel/OpenOffice/LibreOffice/etc Paste to SQL command field Change table name Profit!
-
Download and install Adminer tool
-
Create plugins folder next to
adminer.php
-
Download
plugins.php
, this file is needed to load plugins; and place it into plugins folder -
Download
AdminerTsvToSql.php
and place it into plugins folderFile structure will be:
- adminer.php - plugins/ - plugin.php - AdminerTsvToSql.php - ... (other plugins you've already installed)
-
Edit or create
index.php
file next toadminer.php
and configure plugins and addnew AdminerTsvToSql()
to $plugins array :
<?php
function adminer_object()
{
// required to run any plugin
include_once "./plugins/plugin.php";
// autoloader
foreach (glob("plugins/*.php") as $filename) {
include_once "./$filename";
}
$plugins = array(
// specify enabled plugins here
new AdminerTsvToSql(),
);
return new AdminerPlugin($plugins);
}
// include original Adminer or Adminer Editor
include "./adminer.php";
Final file structure will be:
- adminer.php
- index.php
- plugins/
- plugin.php
- AdminerTsvToSql.php
- ...