0

Google Apps Script Help Centerに記載されている例と同様のダッシュボードを作成しました。これには、データを含むスプレッドシートをフィルタリングするコントロールが含まれています。ダッシュボードにオプションを追加して、除外されたビューを新しいCSVファイルやGoogleスプレッドファイルにエクスポートして、ドライブに保存するオプションを追加したいと思いますが、これを行う方法はわかりません。助言がありますか?Google Appsスクリプト:CSVにダッシュボードをエクスポート

答えて

0

ここでは、Googleのチュートリアルからコードスニペットです:

function saveAsCSV() { 
    // Prompts the user for the file name 
    var fileName = Browser.inputBox("Save CSV file as (e.g. myCSVFile):"); 

    // Check that the file name entered wasn't empty 
    if (fileName.length !== 0) { 
    // Add the ".csv" extension to the file name 
    fileName = fileName + ".csv"; 
    // Convert the range data to CSV format 
    var csvFile = convertRangeToCsvFile_(fileName); 
    // Create a file in the Docs List with the given name and the CSV data 
    DocsList.createFile(fileName, csvFile); 
    } 
    else { 
    Browser.msgBox("Error: Please enter a CSV file name."); 
    } 
}* 

full tutorial and code hereを見ます。

関連する問題