Coder Social home page Coder Social logo

php-excel2html's Introduction

tomk79/php-excel2html

Convert Excel(*.xlsx) to HTML Table. (with PhpSpreadsheet).

Excel 形式のファイルを、HTMLの tableタグに変換します。 (PhpSpreadsheet) を利用しています)

Linux Windows
master
develop

Basic Usage - 使い方

composer コマンドを使用してプロジェクトに tomk79/php-excel2html をインストールします。(composerについて詳しくはcomposerのドキュメントをご覧ください)

$ composer require tomk79/php-excel2html

次のコードは実装例です。

<?php
require_once( './vendor/autoload.php' );

$src = (new \tomk79\excel2html\main('path/to/your/excel.xlsx'))->get_html(array(
	'renderer'=>'simplify'
));

print $src;

Options - オプション

string renderer
レンダリングモード。simplify(単純化)、またはstrict(そのまま表示) のいずれかを指定します。デフォルトは strict です。 CSVファイルの場合は設定に関わらず強制的に simplify が選択されます。
string cell_renderer
セルのレンダリングモード。html(HTMLコードとして処理)、text(プレーンテキストとして処理)、またはmarkdown(Markdownとして処理) のいずれかを指定します。デフォルトは text です。
bool render_cell_width
セル幅を再現する。
bool render_cell_height
セル高を再現する。
bool render_cell_background
セルの背景設定を再現する。
bool render_cell_font
セルの文字設定を再現する。
bool render_cell_borders
セルのボーダーを再現する。
bool render_cell_align
セルの左右位置揃えを再現する。
bool render_cell_vertical_align
セルの上下位置揃えを再現する。
int header_row
ヘッダー行の番号。デフォルトは 0。
int header_col
ヘッダー列の番号。デフォルトは 0。
bool strip_table_tag
tableタグを削除するかどうか。true のとき、tableタグは削除した状態で出力されます。デフォルトは false です。

更新履歴 - Change log

tomk79/php-excel2html v0.1.2 (2023年2月5日)

  • 内部コードの細かい修正。

tomk79/php-excel2html v0.1.1 (2020年10月17日)

  • セル結合している場合に、HTMLテーブルが崩れる不具合を修正。
  • ハイパーリンクが設定されたセルが、a要素でリンクが再現されるようになった。

tomk79/php-excel2html v0.0.9 (2020年10月17日)

  • ハイパーリンクが設定されたセルが、a要素でリンクが再現されるようになった。

tomk79/php-excel2html v0.1.0 (2020年6月11日)

  • Excelファイルの解析ライブラリを PHPExcel から PhpSpreadsheet へ移行した。
  • PhpSpreadsheet に合わせて、システム要件を更新。 PHP 7.1.x 以下が対象外となり、いくつかのPHP拡張が要件に追加された。

tomk79/php-excel2html v0.0.8 (2020年6月11日)

  • PHPExcelの特定の処理で異常終了する場合がある問題を修正。

tomk79/php-excel2html v0.0.7 (2016年10月18日)

  • PHPExcelの特定の処理で異常終了する場合がある問題を修正。

tomk79/php-excel2html v0.0.6 (2016年10月17日)

  • 最後の行が結合されている場合に、列幅指定が欠落する不具合を修正。

tomk79/php-excel2html v0.0.5 (2016年10月4日)

  • michelf/php-markdown を更新

tomk79/php-excel2html v0.0.4 (2015年7月28日)

  • PHP5.4系で起きていた不具合を修正。

tomk79/php-excel2html v0.0.3 (2015年7月9日)

  • CSVを入力した場合の処理を分離・調整、詳細なレンダリングオプションを追加。
  • セルの値を、書式設定に従って表示するようになった。

tomk79/php-excel2html v0.0.2 (2015年6月18日)

  • セルの幅を % で計算するように修正。
  • その他不具合の修正。

tomk79/php-excel2html v0.0.1 (2015年6月9日)

  • Initial Release.

ライセンス - License

MIT License

作者 - Author

php-excel2html's People

Contributors

tomk79 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

juntf ariborneo

php-excel2html's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.