CSV2TABLE

| カテゴリ:JavaScript, jQuery | コメント(0) | トラックバック(0)

CSVデータを読み込み、それをテーブルで出力するjQueryプラグイン。

使い方

$("セレクタ").csv2table("CSVファイルURL",option);

オプション

{
  url                : url,
  nowloadingImg      : $.csv2table.loadImg,              //ローディング画像
  nowloadingMsg      : 'now loading...',                 //ローディングメッセージ
  sortNImg           : $.csv2table.sortNImg,             //ソートボタン画像
  sortDImg           : $.csv2table.sortDImg,             //降順ソートボタン画像
  sortAImg           : $.csv2table.sortAImg,             //昇順ソートボタン画像
  removeDoubleQuote  : true,                             //データ内のダブルクォーテーションを除去
  col_midasi         : 0,                                //見出し行の番号。1行目が0。それより前は表示されない
  row_sep            : '\n',                             //CSVファイルにおける行区切り。デフォルトは'\n'
  col_sep            : ',',                              //列区切り(,|\t|;)。デフォルトは','
  sortable           : true,                             //列ソート
  select             : '*',                              //表示したい列のindex番号で0から始まる連番の配列。デフォルトの'*' は全ての列。
  orderBy            : null,                             //ソートする列の配列。orderBy:[[colNo|'colName','sortType']]
  where              : null,                             //表示する行の絞り込み。配列。 : [{'ColName':'condition'}] 等
  limit              : null,                             //出力する値の制限の配列。 : [offset,len]
  col0color          : true,                             //jQchart line_strokeStyleと同期する0番目の列の色
  numArignRight      : true,                             //数値のTDに"textAlign : 'right'"をセット
  onload             : null,                             //コールバック関数 function (id,op,data,ary) {}
  use                : null,                             // 'jqchart:line#canvasID'
  className_div      : 'csv2table-div',                  //テーブルを挿入するdivのクラス名 
  className_table    : 'csv2table-table',                //テーブルのクラス名
  className_table_th : 'csv2table-table-th',             //THのクラス名
  className_table_td : 'csv2table-table-td',             //TDのクラス名
  className_hoboNum  : 'csv2table-hoboNum',              //数値だけのセルのクラス名
  className_sortMark : 'csv2table-sortMark',             //ソートボタンを含むセルのクラス名
  className_legends  : 'csv2table-legends'               //?のクラス名
}

トラックバック(0)

トラックバックURL: http://tech.ludicmind.net/admin/mt-tb.cgi/102

コメントする

TwitThis

今読んでいる記事をTwitterに投稿