日本語の説明は下にあります。(Japanese explanation is the below.)
Adminer plugin to download selected result as XLSX (Excel).
It is available in the pages of default results and SQL results.
If multileple selected results are displayed, they are packed in the single file and each result is saved in sheet.
- Install Adminer PHP plugin.
- Place
dumpxlsx.jsto the same directory of plugin PHP file. - You can change paths to Sheet JS, FileSaver.js and dumpxlsx.js with arguments of constructor of plugin class.
- Place
dumpxlsx.jsto the web directory, for example, the same directory of theadminneo.php. - Place the
adminneo-config.phpin the same directory ofadminneo.phpand write the following.
<?php
return [
'jsUrls' => [
'https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.16.9/xlsx.full.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js',
'dumpxlsx.js',
],
];For more details, check Admin Neo Configuration page.
SELECT結果をXLSX(Excel)にダウンロードするAdminerプラグインです。
デフォルトの結果ページ、SQLの結果ページで利用可能です。
複数のSELECT結果がある場合は、それぞれシートに分けて1つのファイルにまとめます。
自分の記事で恐縮ですが、以下の内容を反映したものです。
https://qiita.com/tomgoodsun/items/0107e5d778b803935fc0
- PHPファイルのプラグインをインストールしてください。
dumpxlsx.jsをプラグインと同じディレクトリに配置してください。- プラグインクラスのコンストラクタの引数でJSファイルのパスを変更することができます。
dumpxlsx.jsをウェブディレクトリに配置してください。例えば、adminneo.phpと同じディレクトリなどに配置してください。adminneo-config.phpを作成し、以下のように記述してください。
<?php
return [
'jsUrls' => [
'https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.16.9/xlsx.full.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js',
'dumpxlsx.js',
],
];詳細はAdmin Neo Configurationページを参照してください。
