合并Google Spreadsheets Landscape

时间:2015-02-06 20:35:42

标签: google-apps-script merge google-sheets landscape

我正在尝试使用Google Apps脚本合并多个电子表格。

我的电子表格已格式化为正确打印。

我可以使用以下代码段合并它们:

var coverss = SpreadsheetApp.openById(keyCover); //Open the cover     spreadsheet
var bodyss = SpreadsheetApp.openById(keyBody); // Open the body spreadsheet
var specialss = SpreadsheetApp.openById(keySpecial); //Open the Special's spreadsheet

var newSpreadSheet = SpreadsheetApp.create("New Spreadsheet"); 

for (var y in coverss.getSheets()) {
  coverss.getSheets()[y].copyTo(newSpreadSheet);  //copy cover to new   spreadsheet
}

for (var y in bodyss.getSheets()) {    
  bodyss.getSheets()[y].copyTo(newSpreadSheet);  //copy all body sheets   to new spreadsheet
}

for (var y in specialss.getSheets()) {
  specialss.getSheets()[y].copyTo(newSpreadSheet); //copy specials   sheet to new spreadsheet
}

var delsheet = newSpreadSheet.getSheetByName('Sheet1'); //delete Sheet1   that was created when the new spreadsheet was created
newSpreadSheet.deleteSheet(delsheet);

我的问题是"新电子表格中的数据"现在格式化为肖像。 当我打印"新电子表格"作为风景,它运行到第二页不居中。它现在是肖像的宽度。

有什么想法吗?

0 个答案:

没有答案