게시판 엑셀다운 시 행과 열을 순서를 바꿀 수는 없을까요? 채택완료

게시판 내용을 엑셀로 다운받게 작업 했는데요. 행과 열의 순서를 바꿀라면 어떻게 수정해야 될까요?
값은 list.skin에서 가져오고,
엑셀 조정은 다른분께서 작업하신 소스를 다운받아서 했습니다.
디자인으로 수정할려고 했으나, 리스트의 구조가 바뀌어서 잘 안됩니다.
근데, 소스를 도통몰라가지고 어디를 손대어 될지 모르겠습니다.
//table2excel.js ;(function ( $, window, document, undefined ) { var pluginName = "table2excel",
defaults = { exclude: ".noExl", name: "Table2Excel" };
// The actual plugin constructor function Plugin ( element, options ) { this.element = element; // jQuery has an extend method which merges the contents of two or // more objects, storing the result in the first object. The first object // is generally empty as we don't want to alter the default options for // future instances of the plugin // this.settings = $.extend( {}, defaults, options ); this._defaults = defaults; this._name = pluginName; this.init(); }
Plugin.prototype = { init: function () { var e = this;
var utf8Heading = ""; e.template = { head: """ target="_blank" rel="noopener noreferrer">http://www.w3.org/TR/REC-html40\">" + utf8Heading + "
", table: { head: "
답변 2개
답변에 대한 댓글 3개
답변자는 딱 3명 고정인가요?
질문이 100개이고 답변자가 200명 이면??
--------------------
더우기 위 소스로는 설명이 안됩니다
그누보드에서 사용하는 PHPExcel 모듈을 이용하면 직관적으로 데이터를 셀에 넣을 수 있습니다
사용법은 구글검색해서 익히세요(셀 크기, 배경색, 글자색 등 지정 가능)
$list만 만들면 셀에 값을 넣는 예제는 아래 처럼 간단 합니다
$objPHPExcel->getActiveSheet()->setCellValue('A1', '제목');
$objPHPExcel->getActiveSheet()->setCellValue('B1', '이름');
$objPHPExcel->getActiveSheet()->setCellValue('C1', '날짜');
$cnt= count($list);
for($i=0; $i< $cnt; $i++){ $k=$i+2;
$objPHPExcel->getActiveSheet()->setCellValue('A'.$k, $list[$i]['subject']);
$objPHPExcel->getActiveSheet()->setCellValue('B'.$k, $list[$i]['name']);
$objPHPExcel->getActiveSheet()->setCellValue('C'.$k, $list[$i]['date']);
}
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
홍길동 김00 이00
제목1 답변1 답변1 답변1
제목2 답변2 답변2 답변2
제목3 답변3 답변3 답변3
제목4 답변4 답변4 답변4