ดังนั้น... ฉันกำลังพยายามเริ่มต้นใช้งาน Google Apps Script โดยทำงานร่วมกับ หนังสือเล่มนี้
ในตัวอย่างแรกๆ ฉันประสบปัญหาเล็กน้อย ฉันไม่สามารถรับสคริปต์เพื่อเปิด Google เอกสาร พิมพ์คำทักทายแล้วปิดได้
นี่คือรหัสที่เกี่ยวข้อง:
function helloDocument() {
var greeting = 'Hello World!';
// Create DocumentApp instance
var doc = DocumentApp.create('test_DocumentApp');
// Write the greeting to a Google Document.
doc.setText(greeting);
// Close the newly created document
doc.saveAndClose();
}
มีความคิดเห็นเกี่ยวกับสิ่งที่ฉุดรั้งฉันไว้บ้างไหม? เมื่อฉันเลือกฟังก์ชันที่จะเรียกใช้จาก Script Editor มันแสดงข้อความว่ากำลังทำงานอยู่ จากนั้น... ไม่มีอะไรเลย