OfficeScript.DownloadFileProperties interface
Die herunterzuladende Datei.
Hinweise
Verwendet von
Beispiele
/**
* This script saves a worksheet as a PDF and emails that PDF to a recipient.
*/
function main(workbook: ExcelScript.Workbook) {
// Create the PDF.
const pdfObject = OfficeScript.convertToPdf();
const pdfFile: OfficeScript.DownloadFileProperties = { name: "report.pdf", content: pdfObject }; // Enter your desired PDF name here.
// Download the PDF.
OfficeScript.downloadFile(pdfFile);
// Email the PDF.
OfficeScript.sendMail({
to: "name@email.com", // Enter your recipient email address here.
subject: "[Demo] Monthly Sales Report", // This is the subject of your email.
content: "Here's the Monthly Sales Report", // This is the content within your email.
attachments: [pdfFile]
})
}
Eigenschaften
| content | Der Inhalt der Datei. |
| name | Der Name der heruntergeladenen Datei. Die Dateierweiterung bestimmt den Dateityp. Unterstützte Erweiterungen sind ".txt" und ".pdf". Der Standardwert ist ".txt". |
Details zur Eigenschaft
content
Der Inhalt der Datei.
content: string;
Eigenschaftswert
string
name
Der Name der heruntergeladenen Datei. Die Dateierweiterung bestimmt den Dateityp. Unterstützte Erweiterungen sind ".txt" und ".pdf". Der Standardwert ist ".txt".
name: string;
Eigenschaftswert
string