সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
Advanced Sheets পরিষেবা আপনাকে Apps Script ব্যবহার করে Sheets API অ্যাক্সেস করতে দেয়। অনেকটা Apps Script-এর অন্তর্নির্মিত Google Sheets API পরিষেবার মতো, এই API স্ক্রিপ্টগুলিকে Google পত্রকগুলিতে ডেটা পড়তে, সম্পাদনা করতে, ফর্ম্যাট করতে এবং উপস্থাপন করতে দেয়৷ বেশিরভাগ ক্ষেত্রে, অন্তর্নির্মিত পরিষেবাটি ব্যবহার করা সহজ, তবে এই উন্নত পরিষেবাটি কয়েকটি অতিরিক্ত বৈশিষ্ট্য সরবরাহ করে।
রেফারেন্স
এই পরিষেবার বিস্তারিত তথ্যের জন্য, শীট API-এর রেফারেন্স ডকুমেন্টেশন দেখুন। Apps স্ক্রিপ্টের সমস্ত উন্নত পরিষেবাগুলির মতো, উন্নত পত্রক পরিষেবা সর্বজনীন API হিসাবে একই বস্তু, পদ্ধতি এবং পরামিতিগুলি ব্যবহার করে৷ আরও তথ্যের জন্য, দেখুন কিভাবে পদ্ধতি স্বাক্ষর নির্ধারণ করা হয় ।
নিচের নমুনা কোডটি API এর 4 সংস্করণ ব্যবহার করে; এটি শীট API-এর একমাত্র সংস্করণ যা বর্তমানে Apps স্ক্রিপ্টে একটি উন্নত পরিষেবা হিসাবে উপলব্ধ৷
একটি পরিসর থেকে মান পড়ুন
নীচের উদাহরণটি দেখায় যে কীভাবে শীট উন্নত পরিষেবার সাথে একটি শীটে একটি নির্দিষ্ট পরিসর থেকে ডেটা মানগুলি পড়তে হয়৷ এটি একটি একক পরিসরের রেসিপি নমুনার সমতুল্য।
/** * Read a range (A1:D5) of data values. Logs the values. * @param {string} spreadsheetId The spreadsheet ID to read from. * @see https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get */functionreadRange(spreadsheetId=yourspreadsheetId){try{constresponse=Sheets.Spreadsheets.Values.get(spreadsheetId,'Sheet1!A1:D5');if(response.values){console.log(response.values);return;}console.log('Failedtogetrangeofvaluesfromspreadsheet');}catch(e){// TODO (developer) - Handle exceptionconsole.log('Failedwitherror%s',e.message);}}
একাধিক রেঞ্জে মান লিখুন
নিম্নলিখিত উদাহরণটি দেখায় কিভাবে একটি অনুরোধের সাথে একটি শীটে বিভিন্ন, বিচ্ছিন্ন রেঞ্জে ডেটা লিখতে হয়। এটি একাধিক রেঞ্জ রেসিপি নমুনা লিখুন সমতুল্য.
/** * Write to multiple, disjoint data ranges. * @param {string} spreadsheetId The spreadsheet ID to write to. * @see https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate */functionwriteToMultipleRanges(spreadsheetId=yourspreadsheetId){// Specify some values to write to the sheet.constcolumnAValues=[['Item','Wheel','Door','Engine']];constrowValues=[['Cost','Stocked','ShipDate'],['$20.50','4','3/1/2016']];constrequest={'valueInputOption':'USER_ENTERED','data':[{'range':'Sheet1!A1:A4','majorDimension':'COLUMNS','values':columnAValues},{'range':'Sheet1!B1:D2','majorDimension':'ROWS','values':rowValues}]};try{constresponse=Sheets.Spreadsheets.Values.batchUpdate(request,spreadsheetId);if(response){console.log(response);return;}console.log('responsenull');}catch(e){// TODO (developer) - Handle exceptionconsole.log('Failedwitherror%s',e.message);}}
একটি নতুন শীট যোগ করুন
নিম্নলিখিত উদাহরণটি দেখায় কিভাবে নির্দিষ্ট আকার এবং ট্যাবের রঙ সহ একটি নতুন শীট তৈরি করা যায়। এটি একটি শীট রেসিপি নমুনার সমতুল্য।
/** * Add a new sheet with some properties. * @param {string} spreadsheetId The spreadsheet ID. * @see https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/batchUpdate */functionaddSheet(spreadsheetId=yourspreadsheetId){constrequests=[{'addSheet':{'properties':{'title':'Deposits','gridProperties':{'rowCount':20,'columnCount':12},'tabColor':{'red':1.0,'green':0.3,'blue':0.4}}}}];try{constresponse=Sheets.Spreadsheets.batchUpdate({'requests':requests},spreadsheetId);console.log('CreatedsheetwithID: ' +response.replies[0].addSheet.properties.sheetId);}catch(e){// TODO (developer) - Handle exceptionconsole.log('Failedwitherror%s',e.message);}}
একটি পিভট টেবিল তৈরি করুন
নিম্নলিখিত উদাহরণটি দেখায় কিভাবে উৎস ডেটা থেকে একটি পিভট টেবিল তৈরি করতে হয়। এটি একটি পিভট টেবিল রেসিপি নমুনার সমতুল্য।
/** * Add a pivot table. * @param {string} spreadsheetId The spreadsheet ID to add the pivot table to. * @param {string} pivotSourceDataSheetId The sheet ID to get the data from. * @param {string} destinationSheetId The sheet ID to add the pivot table to. * @see https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/batchUpdate */functionaddPivotTable(spreadsheetId=yourspreadsheetId,pivotSourceDataSheetId=yourpivotSourceDataSheetId,destinationSheetId=yourdestinationSheetId){constrequests=[{'updateCells':{'rows':{'values':[{'pivotTable':{'source':{'sheetId':pivotSourceDataSheetId,'startRowIndex':0,'startColumnIndex':0,'endRowIndex':20,'endColumnIndex':7},'rows':[{'sourceColumnOffset':0,'showTotals':true,'sortOrder':'ASCENDING','valueBucket':{'buckets':[{'stringValue':'West'
}]}},{'sourceColumnOffset':1,'showTotals':true,'sortOrder':'DESCENDING','valueBucket':{}}],'columns':[{'sourceColumnOffset':4,'sortOrder':'ASCENDING','showTotals':true,'valueBucket':{}}],'values':[{'summarizeFunction':'SUM','sourceColumnOffset':3}],'valueLayout':'HORIZONTAL'
}}]},'start':{'sheetId':destinationSheetId,'rowIndex':49,'columnIndex':0},'fields':'pivotTable'
}}];try{constresponse=Sheets.Spreadsheets.batchUpdate({'requests':requests},spreadsheetId);// The Pivot table will appear anchored to cell A50 of the destination sheet.}catch(e){// TODO (developer) - Handle exceptionconsole.log('Failedwitherror%s',e.message);}}
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-01-07 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["The Advanced Sheets service allows Apps Script to interact with the Sheets API, enabling scripts to read, edit, format, and present data within Google Sheets."],["This advanced service offers additional features beyond the built-in Google Sheets service, but requires enabling before use."],["The service utilizes the same objects, methods, and parameters as the public Sheets API, mirroring its functionality within Apps Script."],["It provides access to version 4 of the Sheets API, enabling actions such as reading and writing data, adding sheets, and creating pivot tables."]]],[]]