Mục tiêu ngày 14 🎯
Sau hôm nay bạn sẽ:
✔ Xuất dữ liệu Excel
✔ Xuất PDF hồ sơ nhân sự
✔ Tối ưu tốc độ Web App
✔ Hoàn thiện hệ thống HRM đầy đủ
Apps Script cho phép tải file Google Sheets dưới dạng Excel.
functionexportExcel(){
constss=SpreadsheetApp.getActive()
consturl=ss.getUrl().replace(/edit$/,'')
returnurl+'export?format=xlsx'
}
<buttononclick="downloadExcel()">Export Excel</button>
<script>
functiondownloadExcel(){
google.script.run
.withSuccessHandler(function(url){
window.open(url)
})
.exportExcel()
}
</script>
profile.html