File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @scriptaddicts/docsserviceapp" ,
3- "version" : " 1.0.10 " ,
3+ "version" : " 1.0.11 " ,
44 "description" : " Fork of DocsServiceApp to continue support of the library" ,
55 "main" : " index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change 165165 putError . call ( this , e . message ) ;
166166 }
167167 }
168+ let tempSheetInDestFile ;
168169 try {
169170 const tmpSpreadsheet = SpreadsheetApp . openById ( tmpId ) ;
170171 tmpSheet = tmpSpreadsheet . getSheets ( ) [ 0 ] ;
171172 tmpSheet . setName ( `SpreadsheetAppp_${ Utilities . getUuid ( ) } ` ) ;
172- tmpSheet . copyTo ( dstSS ) ;
173+ tempSheetInDestFile = tmpSheet . copyTo ( dstSS ) ;
173174
174175 Drive . Files . remove ( tmpId ) ;
175176 } catch ( err ) {
189190 }
190191 tmpSheetId = tmpSheet . getSheetId ( ) ;
191192 requests = ar . map ( ( e ) => {
192- e . from . sheetId = tmpSheetId ;
193+ e . from . sheetId = tempSheetInDestFile . getSheetId ( ) ;
193194 e . to . sheetId = dstSheetId ;
194195 return {
195196 copyPaste : {
217218 putError . call ( this , e . message ) ;
218219 }
219220 }
220- dstSS . deleteSheet ( tmpSheet ) ;
221+ dstSS . deleteSheet ( tempSheetInDestFile ) ;
221222 return null ;
222223 }
223224
You can’t perform that action at this time.
0 commit comments