4

Possible Duplicate:
Google apps script to email google spreadsheet excel version

I looked everywhere for this but cannot get it to work. I am sending an email with an attachment in google app script. The document is a google spreadsheet. It currently sends as a pdf, however, I would like it to send as a xls. When I run the below code, I get "Unsupported Conversion requested". How can I send it as an xls?

function practiceMail() {

var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveRange();
var file = DocsList.getFileById(docID);
var attachment = file.getAs('application/vnd.ms-excel');
var myFile = [file];

MailApp.sendEmail(email, subject, body, {attachments:myFile, mimetype:application/vnd.ms-  excel });
}
4

1 回答 1

1

请参阅此问题以获取解释。简而言之,答案是否定的。你不能做这个。但是,有一个未解决的问题,您可以加注星号以请求此功能。

于 2012-10-12T08:54:04.663 回答