একটি নথি ট্যাব, সমৃদ্ধ পাঠ্য এবং উপাদান যেমন টেবিল এবং তালিকা রয়েছে।
 Document.getTabs()[tabIndex].asDocumentTab() ব্যবহার করে একটি নথি ট্যাব পুনরুদ্ধার করুন।
// Get a specific document tab based on the tab ID. // TODO(developer): Replace the IDs with your own. const documentTab = DocumentApp.openById('123abc').getTab('123abc').asDocumentTab();
পদ্ধতি
| পদ্ধতি | রিটার্ন টাইপ | সংক্ষিপ্ত বিবরণ | 
|---|---|---|
| add Bookmark(position) | Bookmark | প্রদত্ত PositionএকটিBookmarkযোগ করে। | 
| add Footer() | Footer Section | একটি ট্যাব ফুটার বিভাগ যোগ করে, যদি কোনটি বিদ্যমান না থাকে। | 
| add Header() | Header Section | একটি ট্যাব শিরোনাম বিভাগ যোগ করে, যদি কোনটি বিদ্যমান না থাকে। | 
| add Named Range(name, range) | Named Range | একটি Named Rangeযোগ করে, যা একটিRangeযার একটি নাম এবং আইডি রয়েছে যা পরবর্তীতে পুনরুদ্ধারের জন্য ব্যবহার করা যায়। | 
| get Body() | Body | ট্যাবের Bodyপুনরুদ্ধার করে। | 
| get Bookmark(id) | Bookmark | প্রদত্ত আইডি দিয়ে Bookmarkপায়। | 
| get Bookmarks() | Bookmark[] | ট্যাবে সমস্ত Bookmarkবস্তু পায়। | 
| get Footer() | Footer Section | ট্যাবের ফুটার বিভাগ পুনরুদ্ধার করে, যদি একটি বিদ্যমান থাকে। | 
| get Footnotes() | Footnote[] | ট্যাবের শরীরের সমস্ত Footnoteউপাদান পুনরুদ্ধার করে। | 
| get Header() | Header Section | ট্যাবের হেডার বিভাগ পুনরুদ্ধার করে, যদি একটি বিদ্যমান থাকে। | 
| get Named Range By Id(id) | Named Range | প্রদত্ত আইডি দিয়ে Named Rangeপায়। | 
| get Named Ranges() | Named Range[] | ট্যাবে সমস্ত Named Rangeঅবজেক্ট পায়। | 
| get Named Ranges(name) | Named Range[] | প্রদত্ত নামের সাথে ট্যাবে সমস্ত Named Rangeঅবজেক্ট পায়। | 
| new Position(element, offset) | Position | একটি নতুন Positionতৈরি করে, যা একটি নির্দিষ্ট উপাদানের সাথে সম্পর্কিত ট্যাবে একটি অবস্থানের একটি রেফারেন্স। | 
| new Range() | Range Builder | ট্যাব উপাদান থেকে Rangeঅবজেক্ট তৈরি করতে ব্যবহৃত একটি নির্মাতা তৈরি করে। | 
বিস্তারিত ডকুমেন্টেশন
 add Bookmark(position)
 প্রদত্ত Position একটি Bookmark যোগ করে।
// Opens the Docs file and retrieves the tab by its IDs. If you created your // script from within a Google Docs file, you can use // DocumentApp.getActiveDocument().getActiveTab() instead. // TODO(developer): Replace the IDs with your own. const documentTab = DocumentApp.openById('123abc').getTab('123abc').asDocumentTab(); // Gets the tab body and adds a paragraph. const paragraph = documentTab.getBody().appendParagraph('My new paragraph.'); // Creates a position at the first character of the paragraph text. const position = documentTab.newPosition(paragraph.getChild(0), 0); // Adds a bookmark at the first character of the paragraph text. const bookmark = documentTab.addBookmark(position); // Logs the bookmark ID to the console. console.log(bookmark.getId());
পরামিতি
| নাম | টাইপ | বর্ণনা | 
|---|---|---|
| position | Position | নতুন বুকমার্কের অবস্থান। | 
প্রত্যাবর্তন
 Bookmark — নতুন বুকমার্ক।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents
 add Header()
একটি ট্যাব শিরোনাম বিভাগ যোগ করে, যদি কোনটি বিদ্যমান না থাকে।
// Opens the Docs file and retrieves the tab by its IDs. If you created your // script from within a Google Docs file, you can use // DocumentApp.getActiveDocument().getActiveTab() instead. // TODO(developer): Replace the IDs with your own. const documentTab = DocumentApp.openById('123abc').getTab('123abc').asDocumentTab(); // Adds a header to the tab. const header = documentTab.addHeader(); // Sets the header text to 'This is a header.' header.setText('This is a header');
প্রত্যাবর্তন
 Header Section - ট্যাব হেডার।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents
 add Named Range(name, range)
 একটি Named Range যোগ করে, যা একটি Range যার একটি নাম এবং আইডি রয়েছে যা পরবর্তীতে পুনরুদ্ধারের জন্য ব্যবহার করা যায়। নামগুলি অগত্যা অনন্য নয়, এমনকি ট্যাব জুড়েও; একই ডকুমেন্টের বিভিন্ন রেঞ্জ একই নাম শেয়ার করতে পারে, অনেকটা HTML-এর একটি ক্লাসের মতো। বিপরীতে, আইডিগুলি ডকুমেন্টের মধ্যে অনন্য, যেমন HTML-এর একটি ID। আপনি একটি Named Range যোগ করার পরে আপনি এটি সংশোধন করতে পারবেন না, আপনি শুধুমাত্র এটি সরাতে পারেন৷
 যে কোনো স্ক্রিপ্ট যা ট্যাবটি অ্যাক্সেস করে একটি Named Range অ্যাক্সেস করতে পারে। স্ক্রিপ্টগুলির মধ্যে অনিচ্ছাকৃত দ্বন্দ্ব এড়াতে, একটি অনন্য স্ট্রিং সহ রেঞ্জের নামগুলি উপসর্গ করার কথা বিবেচনা করুন।
// Creates a named range that includes every table in a tab by its ID. // TODO(developer): Replace the IDs with your own. const documentTab = DocumentApp.openById('123abc').getTab('123abc').asDocumentTab(); const rangeBuilder = documentTab.newRange(); const tables = documentTab.getBody().getTables(); for (let i = 0; i < tables.length; i++) { rangeBuilder.addElement(tables[i]); } documentTab.addNamedRange('Tab t.0 tables', rangeBuilder.build());
পরামিতি
| নাম | টাইপ | বর্ণনা | 
|---|---|---|
| name | String | পরিসরের নাম, যা অনন্য হওয়ার প্রয়োজন নেই; ব্যাপ্তির নাম অবশ্যই 1-256 অক্ষরের মধ্যে হতে হবে। | 
| range | Range | নামের সাথে যুক্ত করার জন্য উপাদানের পরিসর; পরিসীমা একটি অনুসন্ধান ফলাফল হতে পারে বা new Range()দিয়ে ম্যানুয়ালি তৈরি করা যেতে পারে। | 
প্রত্যাবর্তন
 Named Range - Named Range ।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents
 get Body()
 ট্যাবের Body পুনরুদ্ধার করে।
 ট্যাবগুলিতে বিভিন্ন ধরণের বিভাগ থাকতে পারে (উদাহরণস্বরূপ, Header Section , Footer Section )। একটি ট্যাবের সক্রিয় অংশ হল Body ।
 Document Tab উপাদান পদ্ধতিগুলি Body অর্পণ করে।
// Opens the Docs file and retrieves the tab by its IDs. If you created your // script from within a Google Docs file, you can use // DocumentApp.getActiveDocument().getActiveTab() instead. // TODO(developer): Replace the IDs with your own. const documentTab = DocumentApp.openById('123abc').getTab('123abc').asDocumentTab(); // Gets the tab body. const body = documentTab.getBody(); // Gets the body text and logs it to the console. console.log(body.getText());
প্রত্যাবর্তন
 Body — ট্যাবের বডি সেকশন।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents
 get Bookmark(id)
 প্রদত্ত আইডি দিয়ে Bookmark পায়। এই ট্যাবের মধ্যে এই ধরনের Bookmark না থাকলে এই পদ্ধতিটি null প্রদান করে।
// Opens the Docs file and retrieves the tab by its IDs. If you created your // script from within a Google Docs file, you can use // DocumentApp.getActiveDocument().getActiveTab() instead. // TODO(developer): Replace the IDs with your own. const documentTab = DocumentApp.openById('123abc').getTab('123abc').asDocumentTab(); // Gets the bookmark by its ID. const bookmark = documentTab.getBookmark('id.xyz654321'); // If the bookmark exists within the tab, logs the character offset of its // position to the console. Otherwise, logs 'No bookmark exists with the given // ID.' to the console. if (bookmark) { console.log(bookmark.getPosition().getOffset()); } else { console.log('No bookmark exists with the given ID.'); }
পরামিতি
| নাম | টাইপ | বর্ণনা | 
|---|---|---|
| id | String | Bookmarkজন্য আইডি। | 
প্রত্যাবর্তন
 Bookmark — প্রদত্ত আইডি সহ Bookmark , অথবা ট্যাবের মধ্যে এই ধরনের Bookmark বিদ্যমান না থাকলে null ।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents
 get Bookmarks()
 ট্যাবে সমস্ত Bookmark বস্তু পায়।
// Opens the Docs file and retrieves the tab by its IDs. If you created your // script from within a Google Docs file, you can use // DocumentApp.getActiveDocument().getActiveTab() instead. // TODO(developer): Replace the IDs with your own. const documentTab = DocumentApp.openById('123abc').getTab('123abc').asDocumentTab(); // Gets all of the bookmarks in the tab. const bookmarks = documentTab.getBookmarks(); // Logs the number of bookmarks in the tab to the console. console.log(bookmarks.length);
প্রত্যাবর্তন
 Bookmark[] — ট্যাবে Bookmark অবজেক্টের একটি অ্যারে।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents
 get Footnotes()
 ট্যাবের শরীরের সমস্ত Footnote উপাদান পুনরুদ্ধার করে।
 get Footnotes কল ট্যাবের উপাদানগুলির উপর একটি পুনরাবৃত্তি ঘটায়। বড় ট্যাবের জন্য, এই পদ্ধতিতে অপ্রয়োজনীয় কল এড়িয়ে চলুন। 
// Opens the Docs file and retrieves the tab by its IDs. If you created your // script from within a Google Docs file, you can use // DocumentApp.getActiveDocument().getActiveTab() instead. // TODO(developer): Replace the IDs with your own. const documentTab = DocumentApp.openById('123abc').getTab('123abc').asDocumentTab(); // Gets the first footnote. const footnote = documentTab.getFootnotes()[0]; // Logs footnote contents to the console. console.log(footnote.getFootnoteContents().getText());
প্রত্যাবর্তন
 Footnote[] — ট্যাবের পাদটীকা।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents
 get Header()
ট্যাবের হেডার বিভাগ পুনরুদ্ধার করে, যদি একটি বিদ্যমান থাকে।
// Opens the Docs file and retrieves the tab by its IDs. If you created your // script from within a Google Docs file, you can use // DocumentApp.getActiveDocument().getActiveTab() instead. // TODO(developer): Replace the IDs with your own. const documentTab = DocumentApp.openById('123abc').getTab('123abc').asDocumentTab(); // Gets the text of the tab's header and logs it to the console. console.log(documentTab.getHeader().getText());
প্রত্যাবর্তন
 Header Section - ট্যাবের হেডার।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents
 get Named Range By Id(id)
 প্রদত্ত আইডি দিয়ে Named Range পায়। এই পদ্ধতিটি null প্রদান করে যদি ট্যাবে এমন কোন Named Range বিদ্যমান না থাকে। নামগুলি অগত্যা অনন্য নয়, এমনকি ট্যাব জুড়েও; একই ডকুমেন্টের বিভিন্ন রেঞ্জ একই নাম শেয়ার করতে পারে, অনেকটা HTML-এর একটি ক্লাসের মতো। বিপরীতে, আইডিগুলি ট্যাবের মধ্যে অনন্য, যেমন HTML-এর একটি ID।
পরামিতি
| নাম | টাইপ | বর্ণনা | 
|---|---|---|
| id | String | ব্যাপ্তির আইডি, যা ট্যাবের মধ্যে অনন্য। | 
প্রত্যাবর্তন
 Named Range — প্রদত্ত আইডি সহ Named Range , অথবা ট্যাবে এই ধরনের কোনো পরিসর বিদ্যমান না থাকলে null ।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents
 get Named Ranges()
 ট্যাবে সমস্ত Named Range অবজেক্ট পায়।
 একটি Named Range ট্যাব অ্যাক্সেস করে এমন যেকোনো স্ক্রিপ্ট দ্বারা অ্যাক্সেস করা যেতে পারে। স্ক্রিপ্টগুলির মধ্যে অনিচ্ছাকৃত দ্বন্দ্ব এড়াতে, একটি অনন্য স্ট্রিং সহ রেঞ্জের নামগুলি উপসর্গ করার কথা বিবেচনা করুন।
প্রত্যাবর্তন
 Named Range[] — ট্যাবে Named Range অবজেক্টের একটি অ্যারে, সম্ভবত একই নামের একাধিক রেঞ্জ সহ।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents
 get Named Ranges(name)
 প্রদত্ত নামের সাথে ট্যাবে সমস্ত Named Range অবজেক্ট পায়। নামগুলি অগত্যা অনন্য নয়, এমনকি ট্যাব জুড়েও; একই ডকুমেন্টের বিভিন্ন রেঞ্জ একই নাম শেয়ার করতে পারে, অনেকটা HTML-এর একটি ক্লাসের মতো। বিপরীতে, আইডিগুলি ট্যাবের মধ্যে অনন্য, যেমন HTML-এর একটি ID।
 একটি Named Range ট্যাব অ্যাক্সেস করে এমন যেকোনো স্ক্রিপ্ট দ্বারা অ্যাক্সেস করা যেতে পারে। স্ক্রিপ্টগুলির মধ্যে অনিচ্ছাকৃত দ্বন্দ্ব এড়াতে, একটি অনন্য স্ট্রিং সহ রেঞ্জের নামগুলি উপসর্গ করার কথা বিবেচনা করুন।
পরামিতি
| নাম | টাইপ | বর্ণনা | 
|---|---|---|
| name | String | পরিসরের নাম, যা অগত্যা অনন্য নয়। | 
প্রত্যাবর্তন
 Named Range[] — প্রদত্ত নামের সাথে ট্যাবে Named Range অবজেক্টের একটি অ্যারে।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents
 new Position(element, offset)
 একটি নতুন Position তৈরি করে, যা একটি নির্দিষ্ট উপাদানের সাথে সম্পর্কিত ট্যাবে একটি অবস্থানের একটি রেফারেন্স। ব্যবহারকারীর কার্সার অন্যান্য ব্যবহারের মধ্যে একটি Position হিসাবে উপস্থাপিত হয়। 
// Append a paragraph, then place the user's cursor after the first word of the // new paragraph. // TODO(developer): Replace the IDs with your own. const doc = DocumentApp.openById('123abc'); const documentTab = doc.getTab('123abc').asDocumentTab(); const paragraph = documentTab.getBody().appendParagraph('My new paragraph.'); const position = documentTab.newPosition(paragraph.getChild(0), 2); doc.setCursor(position);
পরামিতি
| নাম | টাইপ | বর্ণনা | 
|---|---|---|
| element | Element | যে উপাদানটিতে সদ্য নির্মিত Positionআছে; এটি অবশ্যই একটিTextউপাদান বাParagraphমতো একটি ধারক উপাদান হতে হবে। | 
| offset | Integer | Textউপাদানগুলির জন্য,Positionআগে অক্ষরের সংখ্যা; অন্যান্য উপাদানের জন্য, একই ধারক উপাদানের মধ্যেPositionআগে চাইল্ড উপাদানের সংখ্যা। | 
প্রত্যাবর্তন
 Position - নতুন Position ।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents
 new Range()
 ট্যাব উপাদান থেকে Range অবজেক্ট তৈরি করতে ব্যবহৃত একটি নির্মাতা তৈরি করে। 
// Change the user's selection to a range that includes every table in the tab. // TODO(developer): Replace the IDs with your own. const doc = DocumentApp.openById('123abc'); const documentTab = doc.getTab('123abc').asDocumentTab(); const rangeBuilder = documentTab.newRange(); const tables = documentTab.getBody().getTables(); for (let i = 0; i < tables.length; i++) { rangeBuilder.addElement(tables[i]); } doc.setSelection(rangeBuilder.build());
প্রত্যাবর্তন
 Range Builder - নতুন নির্মাতা।
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-  https://www.googleapis.com/auth/documents.currentonly
-  https://www.googleapis.com/auth/documents