클릭하면 버튼의 모든 데이터가 페이지의 HTML 양식에서 Excel 파일로 내보내집니다. 아무도 내가 PHP를 처음 사용하고 어디서부터 시작해야할지 모르겠다.PHP/HTML Excel 내보내기 버튼
<div class="left col-md-12 form-group" >
<form method="post" id="triallesson_form">
<div class="table">
<table class="table table-header-rotated table-condensed table-striped table-hover" style="width: 100%;">
<th></th>
<th class="col-xs-1 not-rotate"><div><span><?= text::$string['person_name'] ;?></span></div> </th>
<th class="col-xs-1 not-rotate"><div><span><?= text::$string['person_telphone'] ;?></span></div> </th>
<th class="col-xs-1 not-rotate"><div><span><?= text::$string['location_name'] ;?></span></div> </th>
<th class="col-xs-3 not-rotate"><div><span><?= text::$string['class_date'] ;?></span></div> </th>
<th class="col-xs-2 not-rotate"><div><span><?= text::$string['triallesson_type'] ;?></span></div> </th>
<th class="col-xs-2 not-rotate"><div><span><?= text::$string['triallesson_email'] ;?></span></div> </th>
<th class="col-xs-2 not-rotate"><div><span>via</span></div> </th>
<th class="rotate-45"><div><span><?= text::$string['triallesson_called'] ;?></span></div> </th>
<th class="rotate-45"><div><span><?= text::$string['triallesson_confirmd'] ;?></span></div> </th>
<th class="rotate-45"><div><span><?= text::$string['triallesson_show'] ;?></span></div> </th>
<th class="rotate-45"><div><span><?= text::$string['triallesson_sign_up'] ;?></span></div> </th>
<th class="rotate-45"><div><span><?= text::$string['triallesson_cancelled'] ;?></span></div> </th>
<th class="rotate-45" title="<?= Text::$string['triallesson_sms_info'];?>"><div><span><?= Text::$string['triallesson_sms'] ;?></span></div> </th>
<th></th>
<?= $content[1]; ?>
</table>
<input type="hidden" name="date1" value="<?=$con->date1?>">
<input type="hidden" name="date2" value="<?=$con->date2?>"></form>
</div>
</div>
마지막으로 죄송합니다. 코드를 추가하지 않았습니다. 내 데이터가 표시 될 테이블입니다. 동일한 페이지에서 버튼을 클릭하면 표의 모든 데이터가 XLS 또는 CSV 파일로 내보내집니다.
추가 정보가 필요하면 사전에 보내 주시면 감사하겠습니다.
시도한 바가 있습니다. 이것은 우리가 무료 서비스를 제공 할 사이트가 아닙니다. 적어도 무언가를 시도하고 막힌 곳의 코드를 보여주십시오. 그러면 우리가 당신을 도울 수 있습니다. –
힌트를 보려면 jquery 메서드를 참조하십시오. jquery를 사용하여 Excel에서 데이터를 다운로드합니다. 몇 가지 jquery 코드를 다운로드하여 다운로드하십시오. 여기에 코드가 붙어 있으면 우리가 도울 수 있습니다. –
php는 이러한 유형의 특수 버튼을 제공하지 않습니다. look here https://stackoverflow.com/questions/4249432/export-to-csv-via-php – TarangP