주문내역 phpexcel로 받는데 칸이 밀려요 채택완료
안녕하세요. 주문내역 엑셀출력에 회원가입에 작성한 정보를 불러오고자 쿼리 수정을 하고 출력을 했는데 엑셀 출력은 잘 되는데 아래 이미지처럼 특정부분이 한칸씩 밀려서 출력됩니다.. 혹시 어디에서 문제가 생긴건지 알 수 있을까요?

Copy
if ($csv == 'xls')
{
$fr_date = date_conv($fr_date);
$to_date = date_conv($to_date);
$sql = " SELECT
a.od_id,
od_b_zip1,
od_b_zip2,
od_b_addr1,
od_b_addr2,
od_b_addr3,
od_b_addr_jibeon,
od_b_name,
od_b_tel,
od_b_hp,
od_memo,
b.it_name,
ct_qty,
b.it_id,
a.od_id,
od_memo,
od_invoice,
b.ct_option,
b.ct_send_cost,
b.it_sc_type
FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b
where a.od_id = b.od_id ";
$sql2 = " select * from g5_member ";
if ($case == 1) // 출력기간
$sql .= " and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' ";
else // 주문번호구간
$sql .= " and a.od_id between '$fr_od_id' and '$to_od_id' ";
if ($ct_status)
$sql .= " and b.ct_status = '$ct_status' ";
$sql .=" order by od_time asc, b.it_id, b.io_type, b.ct_id ";
$result = sql_query($sql);
$result2 = sql_query($sql2);
$merged_results = array();
while ($row = sql_fetch_array($result)) {
$merged_results[] = $row;
}
while ($row = sql_fetch_array($result2)) {
$merged_results[] = $row;
}
$cnt = @sql_num_rows($result);
if (!$cnt)
alert("출력할 내역이 없습니다.");
include_once(G5_LIB_PATH.'/PHPExcel.php');
$headers = array('순번', '이름', '전화번호', '우편번호', '주소', '공동현관', '배송메모' , '주문번호' , '상품명', '선택사항', '수량', '배송비' );
$widths = array(10, 30, 10, 15, 15, 15, 10, 10, 20, 15, 20, 20, 50, 50);
$header_bgcolor = 'FFABCDEF';
$last_char = column_char(count($headers) - 1);
$no = 0;
for($i=0; $i
답변 2개
답변을 작성하려면 로그인이 필요합니다.
로그인