Class Range

পরিসর

স্প্রেডশীট ব্যাপ্তি অ্যাক্সেস এবং সংশোধন করুন. একটি পরিসর একটি শীটের একটি একক ঘর বা একটি শীটে সংলগ্ন কক্ষগুলির একটি গ্রুপ হতে পারে।

পদ্ধতি

পদ্ধতি রিটার্ন টাইপ সংক্ষিপ্ত বিবরণ
activate() Range current cell হিসাবে ব্যাপ্তির উপরের বাম কক্ষের সাথে active range হিসাবে নির্দিষ্ট পরিসর সেট করে।
activate As Current Cell() Range নির্দিষ্ট ঘরটিকে current cell হিসাবে সেট করে।
add Developer Metadata(key) Range পরিসরে নির্দিষ্ট কী দিয়ে বিকাশকারী মেটাডেটা যোগ করে।
add Developer Metadata(key, visibility) Range নির্দিষ্ট কী এবং পরিসরে দৃশ্যমানতার সাথে বিকাশকারী মেটাডেটা যোগ করে।
add Developer Metadata(key, value) Range পরিসরে নির্দিষ্ট কী এবং মান সহ বিকাশকারী মেটাডেটা যোগ করে।
add Developer Metadata(key, value, visibility) Range নির্দিষ্ট কী, মান এবং পরিসরে দৃশ্যমানতার সাথে বিকাশকারী মেটাডেটা যোগ করে।
apply Column Banding() Banding পরিসরে একটি ডিফল্ট কলাম ব্যান্ডিং থিম প্রয়োগ করে।
apply Column Banding(bandingTheme) Banding পরিসরে একটি নির্দিষ্ট কলাম ব্যান্ডিং থিম প্রয়োগ করে।
apply Column Banding(bandingTheme, showHeader, showFooter) Banding নির্দিষ্ট হেডার এবং ফুটার সেটিংস সহ পরিসরে একটি নির্দিষ্ট কলাম ব্যান্ডিং থিম প্রয়োগ করে।
apply Row Banding() Banding পরিসরে একটি ডিফল্ট সারি ব্যান্ডিং থিম প্রয়োগ করে৷
apply Row Banding(bandingTheme) Banding পরিসরে একটি নির্দিষ্ট সারি ব্যান্ডিং থিম প্রয়োগ করে।
apply Row Banding(bandingTheme, showHeader, showFooter) Banding নির্দিষ্ট হেডার এবং ফুটার সেটিংস সহ পরিসরে একটি নির্দিষ্ট সারি ব্যান্ডিং থিম প্রয়োগ করে৷
auto Fill(destination, series) void এই পরিসরের ডেটার উপর ভিত্তি করে ডেটা দিয়ে destination Range পূরণ করে।
auto Fill To Neighbor(series) void প্রতিবেশী কক্ষের উপর ভিত্তি করে নতুন ডেটা দিয়ে পূরণ করার জন্য একটি ব্যাপ্তি গণনা করে এবং এই পরিসরে থাকা ডেটার উপর ভিত্তি করে স্বয়ংক্রিয়ভাবে সেই পরিসরটিকে নতুন মান দিয়ে পূরণ করে৷
break Apart() Range রেঞ্জের যেকোন মাল্টি-কলাম সেলকে আবার আলাদা কক্ষে ভেঙে দিন।
can Edit() Boolean ব্যবহারকারীর ব্যাপ্তির প্রতিটি কক্ষ সম্পাদনা করার অনুমতি আছে কিনা তা নির্ধারণ করে।
check() Range পরিসরের চেকবক্সগুলির অবস্থা "চেক করা" এ পরিবর্তন করে।
clear() Range বিষয়বস্তু এবং বিন্যাস পরিসীমা সাফ করে।
clear(options) Range প্রদত্ত উন্নত বিকল্পগুলির সাথে নির্দিষ্ট করা বিষয়বস্তু, বিন্যাস, ডেটা যাচাইকরণের নিয়ম এবং/অথবা মন্তব্যের পরিসর সাফ করে।
clear Content() Range বিন্যাস অক্ষত রেখে পরিসরের বিষয়বস্তু সাফ করে।
clear Data Validations() Range পরিসরের জন্য ডেটা যাচাইকরণের নিয়মগুলি সাফ করে।
clear Format() Range এই ব্যাপ্তির জন্য বিন্যাস সাফ করে।
clear Note() Range প্রদত্ত ঘর বা কক্ষের নোটটি সাফ করে।
collapse Groups() Range পরিসরের মধ্যে সম্পূর্ণরূপে থাকা সমস্ত গোষ্ঠীকে সঙ্কুচিত করে৷
copy Format To Range(gridId, column, columnEnd, row, rowEnd) void প্রদত্ত অবস্থানে পরিসরের বিন্যাস অনুলিপি করুন।
copy Format To Range(sheet, column, columnEnd, row, rowEnd) void প্রদত্ত অবস্থানে পরিসরের বিন্যাস অনুলিপি করুন।
copy To(destination) void কোষের একটি পরিসর থেকে কোষের অন্য পরিসরে ডেটা অনুলিপি করে।
copy To(destination, copyPasteType, transposed) void কোষের একটি পরিসর থেকে কোষের অন্য পরিসরে ডেটা অনুলিপি করে।
copy To(destination, options) void কোষের একটি পরিসর থেকে কোষের অন্য পরিসরে ডেটা অনুলিপি করে।
copy Values To Range(gridId, column, columnEnd, row, rowEnd) void প্রদত্ত অবস্থানে পরিসরের বিষয়বস্তু অনুলিপি করুন।
copy Values To Range(sheet, column, columnEnd, row, rowEnd) void প্রদত্ত অবস্থানে পরিসরের বিষয়বস্তু অনুলিপি করুন।
create Data Source Pivot Table(dataSource) Data Source Pivot Table ডেটা উৎস থেকে একটি খালি ডেটা সোর্স পিভট টেবিল তৈরি করে, এই রেঞ্জের প্রথম কক্ষে অ্যাঙ্কর করা হয়।
create Data Source Table(dataSource) Data Source Table এই পরিসরের প্রথম কক্ষে নোঙর করা ডেটা উৎস থেকে একটি খালি ডেটা উৎস টেবিল তৈরি করে।
create Developer Metadata Finder() Developer Metadata Finder এই পরিসরের মধ্যে বিকাশকারী মেটাডেটা খোঁজার জন্য একটি DeveloperMetadataFinderApi প্রদান করে।
create Filter() Filter একটি ফিল্টার তৈরি করে এবং শীটে নির্দিষ্ট পরিসরে এটি প্রয়োগ করে।
create Pivot Table(sourceData) Pivot Table এই পরিসরের প্রথম কক্ষে নোঙর করা নির্দিষ্ট source Data থেকে একটি খালি পিভট টেবিল তৈরি করে।
create Text Finder(findText) Text Finder পরিসরের জন্য একটি পাঠ্য সন্ধানকারী তৈরি করে, যা এই পরিসরে পাঠ্য খুঁজে পেতে এবং প্রতিস্থাপন করতে পারে।
delete Cells(shiftDimension) void কোষের এই পরিসীমা মুছে দেয়।
expand Groups() Range সঙ্কুচিত গোষ্ঠীগুলিকে প্রসারিত করে যার পরিসর বা নিয়ন্ত্রণ টগল এই ব্যাপ্তির সাথে ছেদ করে৷
getA1Notation() String A1 স্বরলিপিতে, পরিসরের একটি স্ট্রিং বর্ণনা প্রদান করে।
get Background() String পরিসরে উপরের-বাম ঘরের পটভূমির রঙ ফেরত দেয় (উদাহরণস্বরূপ, '#ffffff' )।
get Background Object() Color ব্যাপ্তির উপরের-বাম কক্ষের পটভূমির রঙ ফেরত দেয়।
get Background Objects() Color[][] পরিসরের কক্ষের পটভূমির রং ফেরত দেয়।
get Backgrounds() String[][] পরিসরের কক্ষগুলির পটভূমির রং ফেরত দেয় (উদাহরণস্বরূপ, '#ffffff' )।
get Bandings() Banding[] এই ব্যাপ্তির যেকোনো কক্ষে প্রয়োগ করা সমস্ত ব্যান্ডিং ফেরত দেয়।
get Cell(row, column) Range একটি পরিসরের মধ্যে একটি প্রদত্ত কক্ষ ফেরত দেয়।
get Column() Integer এই ব্যাপ্তির জন্য শুরুর কলামের অবস্থান ফেরত দেয়।
get Data Region() Range সমস্ত সংলগ্ন কক্ষগুলিকে ডেটা সহ কভার করতে চারটি মূল Direction প্রসারিত পরিসরের একটি অনুলিপি প্রদান করে৷
get Data Region(dimension) Range প্রসারিত Direction.UP এবং Direction.DOWN পরিসরের একটি অনুলিপি প্রদান করে যদি নির্দিষ্ট মাত্রাটি হয় Dimension.ROWS , অথবা Direction.NEXT এবং Direction.PREVIOUS যদি মাত্রা Dimension.COLUMNS হয়।
get Data Source Formula() Data Source Formula ব্যাপ্তির প্রথম কক্ষের জন্য Data Source Formula প্রদান করে, অথবা যদি কক্ষে কোনো ডেটা উৎস সূত্র না থাকে তাহলে null
get Data Source Formulas() Data Source Formula[] পরিসরের কক্ষগুলির জন্য Data Source Formula প্রদান করে৷
get Data Source Pivot Tables() Data Source Pivot Table[] ব্যাপ্তির সাথে ছেদ করা সমস্ত ডেটা উৎস পিভট টেবিল পায়।
get Data Source Tables() Data Source Table[] পরিসরের সাথে ছেদ করা সমস্ত ডেটা উত্স টেবিলগুলি পায়৷
get Data Source Url() String এই পরিসরের ডেটার জন্য একটি URL প্রদান করে, যা চার্ট এবং কোয়েরি তৈরি করতে ব্যবহার করা যেতে পারে।
get Data Table() Data Table একটি DataTable হিসাবে এই বস্তুর ভিতরে ডেটা ফেরত দিন।
get Data Table(firstRowIsHeader) Data Table একটি DataTable হিসাবে এই পরিসরের মধ্যে ডেটা ফেরত দিন।
get Data Validation() Data Validation ব্যাপ্তির উপরের-বাম কক্ষের জন্য ডেটা যাচাইকরণ নিয়ম প্রদান করে।
get Data Validations() Data Validation[][] পরিসরের সমস্ত কক্ষের জন্য ডেটা যাচাইকরণের নিয়ম ফেরত দেয়।
get Developer Metadata() Developer Metadata[] এই পরিসরের সাথে যুক্ত বিকাশকারী মেটাডেটা পায়৷
get Display Value() String ব্যাপ্তির মধ্যে উপরের-বাম কক্ষের প্রদর্শিত মান প্রদান করে।
get Display Values() String[][] এই ব্যাপ্তির জন্য মানের আয়তক্ষেত্রাকার গ্রিড প্রদান করে।
get Filter() Filter এই ব্যাপ্তিটি যে শীটে আছে সেই শীটে ফিল্টারটি ফেরত দেয়, অথবা শীটে কোনো ফিল্টার না থাকলে null
get Font Color Object() Color পরিসরের উপরের-বাম কোণে ঘরের ফন্টের রঙ ফেরত দেয়।
get Font Color Objects() Color[][] পরিসরের কক্ষের ফন্টের রং প্রদান করে।
get Font Families() String[][] পরিসরের কক্ষগুলির ফন্ট পরিবারগুলি প্রদান করে৷
get Font Family() String ব্যাপ্তির উপরের-বাম কোণে ঘরের ফন্ট পরিবার ফেরত দেয়।
get Font Line() String পরিসরের উপরের-বাম কোণে ঘরের লাইন শৈলী পায় ( 'underline' , 'line-through' , বা 'none' )।
get Font Lines() String[][] পরিসরে ঘরের লাইন শৈলী পায় ( 'underline' , 'line-through' , বা 'none' )।
get Font Size() Integer পরিসরের উপরের-বাম কোণে ঘরের বিন্দু আকারে ফন্টের আকার ফেরত দেয়।
get Font Sizes() Integer[][] পরিসরের কক্ষের ফন্টের মাপ প্রদান করে।
get Font Style() String পরিসরের উপরের-বাম কোণে ঘরের ফন্ট শৈলী ( 'italic' বা 'normal' ) ফেরত দেয়।
get Font Styles() String[][] পরিসরের কক্ষের ফন্ট শৈলী প্রদান করে।
get Font Weight() String ব্যাপ্তির উপরের-বাম কোণে ঘরের ফন্টের ওজন (স্বাভাবিক/গাঢ়) প্রদান করে।
get Font Weights() String[][] পরিসরের কক্ষের ফন্ট ওজন প্রদান করে।
get Formula() String পরিসরের উপরের-বাম কক্ষের জন্য সূত্র (A1 স্বরলিপি) বা একটি খালি স্ট্রিং প্রদান করে যদি কক্ষটি খালি থাকে বা এতে কোনো সূত্র না থাকে।
get Formula R1C1() String একটি প্রদত্ত কক্ষের জন্য সূত্র (R1C1 স্বরলিপি) প্রদান করে, অথবা কোনোটি না থাকলে null
get Formulas() String[][] পরিসরের কক্ষগুলির জন্য সূত্র (A1 স্বরলিপি) প্রদান করে।
get Formulas R1C1() String[][] পরিসরের কক্ষগুলির জন্য সূত্র (R1C1 স্বরলিপি) প্রদান করে।
get Grid Id() Integer ব্যাপ্তির মূল পত্রকের গ্রিড ID প্রদান করে।
get Height() Integer ব্যাপ্তির উচ্চতা প্রদান করে।
get Horizontal Alignment() String পরিসরের উপরের-বাম কোণে ঘরের পাঠ্যের (বাম/মাঝে/ডান) অনুভূমিক প্রান্তিককরণ ফেরত দেয়।
get Horizontal Alignments() String[][] পরিসরের কক্ষগুলির অনুভূমিক প্রান্তিককরণ দেখায়।
get Last Column() Integer শেষ কলামের অবস্থান ফেরত দেয়।
get Last Row() Integer শেষ সারির অবস্থান ফেরত দেয়।
get Merged Ranges() Range[] একত্রিত কক্ষের প্রতিনিধিত্বকারী Range বস্তুর একটি বিন্যাস প্রদান করে যেগুলি হয় সম্পূর্ণরূপে বর্তমান পরিসরের মধ্যে, অথবা বর্তমান পরিসরে অন্তত একটি কক্ষ রয়েছে৷
get Next Data Cell(direction) Range ব্যাপ্তির প্রথম কলাম এবং সারির কক্ষ থেকে শুরু করে, প্রদত্ত দিক থেকে পরবর্তী কক্ষটি ফেরত দেয় যেটি একটি সংলগ্ন পরিসরের কক্ষের প্রান্ত যার মধ্যে ডেটা থাকে বা সেই দিকের স্প্রেডশীটের প্রান্তে থাকা কক্ষ।
get Note() String প্রদত্ত ব্যাপ্তির সাথে সম্পর্কিত নোট ফেরত দেয়।
get Notes() String[][] পরিসরের কক্ষগুলির সাথে সম্পর্কিত নোটগুলি প্রদান করে৷
get Num Columns() Integer এই পরিসরে কলামের সংখ্যা প্রদান করে।
get Num Rows() Integer এই পরিসরে সারির সংখ্যা প্রদান করে।
get Number Format() String প্রদত্ত পরিসরের উপরের-বাম ঘরের নম্বর বা তারিখ বিন্যাস পান।
get Number Formats() String[][] পরিসরের কক্ষগুলির জন্য সংখ্যা বা তারিখ বিন্যাস প্রদান করে।
get Rich Text Value() Rich Text Value ব্যাপ্তির উপরের বাম কক্ষের জন্য রিচ টেক্সট মান প্রদান করে, বা কক্ষের মান পাঠ্য না হলে null
get Rich Text Values() Rich Text Value[][] পরিসরের কক্ষগুলির জন্য রিচ টেক্সট মান প্রদান করে।
get Row() Integer এই ব্যাপ্তির জন্য সারি অবস্থান প্রদান করে।
get Row Index() Integer এই ব্যাপ্তির জন্য সারি অবস্থান প্রদান করে।
get Sheet() Sheet এই ব্যাপ্তির অন্তর্গত পত্রকটি ফেরত দেয়।
get Text Direction() Text Direction ব্যাপ্তির উপরের বাম কক্ষের জন্য পাঠ্যের দিক নির্দেশ করে।
get Text Directions() Text Direction[][] পরিসরের কক্ষগুলির জন্য পাঠ্যের দিকনির্দেশ প্রদান করে।
get Text Rotation() Text Rotation ব্যাপ্তির উপরের বাম কক্ষের জন্য পাঠ্য ঘূর্ণন সেটিংস প্রদান করে।
get Text Rotations() Text Rotation[][] পরিসরের কক্ষগুলির জন্য পাঠ্য ঘূর্ণন সেটিংস প্রদান করে৷
get Text Style() Text Style ব্যাপ্তির উপরের বাম কক্ষের জন্য পাঠ্য শৈলী প্রদান করে।
get Text Styles() Text Style[][] পরিসরের কক্ষগুলির জন্য পাঠ্য শৈলী প্রদান করে৷
get Value() Object ব্যাপ্তির মধ্যে উপরের-বাম ঘরের মান প্রদান করে।
get Values() Object[][] এই ব্যাপ্তির জন্য মানের আয়তক্ষেত্রাকার গ্রিড প্রদান করে।
get Vertical Alignment() String পরিসরের উপরের-বাম কোণে কক্ষের উল্লম্ব প্রান্তিককরণ (উপর/মাঝে/নীচ) প্রদান করে।
get Vertical Alignments() String[][] পরিসরের কক্ষগুলির উল্লম্ব প্রান্তিককরণ প্রদান করে।
get Width() Integer কলামে ব্যাপ্তির প্রস্থ দেখায়।
get Wrap() Boolean কক্ষের পাঠ্যটি মোড়ানো হয় কিনা তা প্রদান করে।
get Wrap Strategies() Wrap Strategy[][] পরিসরের কক্ষগুলির জন্য পাঠ্য মোড়ানো কৌশলগুলি প্রদান করে৷
get Wrap Strategy() Wrap Strategy ব্যাপ্তির উপরের বাম কক্ষের জন্য পাঠ্য মোড়ানোর কৌশল প্রদান করে।
get Wraps() Boolean[][] কক্ষের টেক্সট মোড়ানো কিনা তা প্রদান করে।
insert Cells(shiftDimension) Range এই পরিসরে খালি কক্ষ সন্নিবেশ করান।
insert Checkboxes() Range পরিসরের প্রতিটি কক্ষে চেকবক্স সন্নিবেশ করান, চেক করা হলে true সাথে কনফিগার করা হয় এবং চেক না করা হলে false
insert Checkboxes(checkedValue) Range পরিসরের প্রতিটি কক্ষে চেকবক্স সন্নিবেশ করান, চেক করার জন্য একটি কাস্টম মান এবং আনচেক করার জন্য খালি স্ট্রিং কনফিগার করা হয়।
insert Checkboxes(checkedValue, uncheckedValue) Range পরিসরের প্রতিটি কক্ষে চেকবক্স সন্নিবেশ করান, চেক করা এবং অচেক করা অবস্থার জন্য কাস্টম মানগুলির সাথে কনফিগার করা।
is Blank() Boolean পরিসীমা সম্পূর্ণ ফাঁকা থাকলে true দেখায়।
is Checked() Boolean পরিসরের সমস্ত কক্ষের চেকবক্স 'চেক করা' হিসাবে আছে কিনা তা ফেরত দেয়।
is End Column Bounded() Boolean পরিসরের শেষ একটি নির্দিষ্ট কলামে আবদ্ধ কিনা তা নির্ধারণ করে।
is End Row Bounded() Boolean পরিসরের শেষ একটি নির্দিষ্ট সারিতে আবদ্ধ কিনা তা নির্ধারণ করে।
is Part Of Merge() Boolean বর্তমান পরিসরের কক্ষগুলি কোনো মার্জ করা কক্ষকে ওভারল্যাপ করলে true দেখায়৷
is Start Column Bounded() Boolean পরিসরের শুরু একটি নির্দিষ্ট কলামে আবদ্ধ কিনা তা নির্ধারণ করে।
is Start Row Bounded() Boolean পরিসরের শুরু একটি নির্দিষ্ট সারিতে আবদ্ধ কিনা তা নির্ধারণ করে।
merge() Range পরিসরের কক্ষগুলিকে একত্রে একক ব্লকে একত্রিত করে।
merge Across() Range পরিসরের কলাম জুড়ে পরিসরের কক্ষগুলিকে মার্জ করুন।
merge Vertically() Range পরিসরের কক্ষগুলিকে একসাথে মার্জ করে।
move To(target) void এই রেঞ্জ থেকে টার্গেট রেঞ্জে কাট এবং পেস্ট করুন (ফরম্যাট এবং মান উভয়ই)।
offset(rowOffset, columnOffset) Range প্রদত্ত সারি এবং কলামের (যা ঋণাত্মক হতে পারে) দ্বারা এই পরিসর থেকে অফসেট করা একটি নতুন পরিসর প্রদান করে।
offset(rowOffset, columnOffset, numRows) Range একটি নতুন ব্যাপ্তি প্রদান করে যা বর্তমান ব্যাপ্তির সাথে সম্পর্কিত, যার উপরের বাম বিন্দুটি বর্তমান পরিসর থেকে প্রদত্ত সারি এবং কলাম দ্বারা অফসেট করা হয় এবং কক্ষে প্রদত্ত উচ্চতা সহ।
offset(rowOffset, columnOffset, numRows, numColumns) Range একটি নতুন ব্যাপ্তি প্রদান করে যা বর্তমান ব্যাপ্তির সাথে সম্পর্কিত, যার উপরের বাম বিন্দুটি বর্তমান পরিসর থেকে প্রদত্ত সারি এবং কলাম এবং কক্ষে প্রদত্ত উচ্চতা এবং প্রস্থের সাথে অফসেট করা হয়৷
protect() Protection এমন একটি বস্তু তৈরি করে যা অনুমতিপ্রাপ্ত ব্যবহারকারীদের ব্যতীত পরিসরটিকে সম্পাদনা করা থেকে রক্ষা করতে পারে৷
randomize() Range প্রদত্ত পরিসরে সারিগুলির ক্রমকে এলোমেলো করে।
remove Checkboxes() Range পরিসর থেকে সমস্ত চেকবক্স সরিয়ে দেয়।
remove Duplicates() Range এই সীমার মধ্যে থাকা সারিগুলিকে সরিয়ে দেয় যেগুলির মধ্যে মান রয়েছে যা পূর্ববর্তী সারির মানগুলির সদৃশ।
remove Duplicates(columnsToCompare) Range এই সীমার মধ্যে থাকা সারিগুলিকে সরিয়ে দেয় যেগুলি নির্দিষ্ট কলামের মানগুলিকে ধারণ করে যা আগের যেকোনো সারির মানগুলির সদৃশ৷
set Background(color) Range CSS স্বরলিপি (যেমন '#ffffff' বা 'white' ) পরিসরের সমস্ত কক্ষের পটভূমির রঙ সেট করে।
set Background Object(color) Range পরিসরের সমস্ত কক্ষের পটভূমির রঙ সেট করে।
set Background Objects(color) Range ব্যাকগ্রাউন্ডের রঙের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মেলে)।
set Background RGB(red, green, blue) Range RGB মান ব্যবহার করে প্রদত্ত রঙে পটভূমি সেট করে (0 এবং 255 এর মধ্যে পূর্ণসংখ্যা অন্তর্ভুক্ত)।
set Backgrounds(color) Range ব্যাকগ্রাউন্ডের রঙের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মেলে)।
set Border(top, left, bottom, right, vertical, horizontal) Range সীমান্ত সম্পত্তি সেট করে।
set Border(top, left, bottom, right, vertical, horizontal, color, style) Range রঙ এবং/অথবা শৈলী দিয়ে সীমানা বৈশিষ্ট্য সেট করে।
set Data Validation(rule) Range পরিসরের সমস্ত কক্ষের জন্য একটি ডেটা যাচাইকরণ নিয়ম সেট করে৷
set Data Validations(rules) Range পরিসরের সমস্ত কক্ষের জন্য ডেটা যাচাইকরণ নিয়ম সেট করে।
set Font Color(color) Range CSS স্বরলিপিতে ফন্টের রঙ সেট করে (যেমন '#ffffff' বা 'white' )।
set Font Color Object(color) Range প্রদত্ত পরিসরের ফন্টের রঙ সেট করে।
set Font Color Objects(colors) Range হরফের রঙের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মিলতে হবে)।
set Font Colors(colors) Range হরফের রঙের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মিলতে হবে)।
set Font Families(fontFamilies) Range ফন্ট ফ্যামিলির একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মেলে)।
set Font Family(fontFamily) Range ফন্ট পরিবার সেট করে, যেমন "Arial" বা "Helvetica"।
set Font Line(fontLine) Range প্রদত্ত পরিসরের ফন্ট লাইন শৈলী সেট করে ( 'underline' , 'line-through' , বা 'none' )।
set Font Lines(fontLines) Range লাইন শৈলীগুলির একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মেলে)।
set Font Size(size) Range ফন্ট সাইজ সেট করে, সাইজটি ব্যবহার করার জন্য পয়েন্ট সাইজ।
set Font Sizes(sizes) Range হরফের আকারের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মিলতে হবে)।
set Font Style(fontStyle) Range প্রদত্ত পরিসরের জন্য ফন্ট শৈলী সেট করুন ( 'italic' বা 'normal' )।
set Font Styles(fontStyles) Range ফন্ট শৈলীগুলির একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মেলে)।
set Font Weight(fontWeight) Range প্রদত্ত পরিসরের জন্য ফন্টের ওজন সেট করুন (স্বাভাবিক/গাঢ়)।
set Font Weights(fontWeights) Range হরফের ওজনের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মেলে)।
set Formula(formula) Range এই ব্যাপ্তির সূত্র আপডেট করে।
set Formula R1C1(formula) Range এই ব্যাপ্তির সূত্র আপডেট করে।
set Formulas(formulas) Range সূত্রের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মিলতে হবে)।
set Formulas R1C1(formulas) Range সূত্রের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মিলতে হবে)।
set Horizontal Alignment(alignment) Range প্রদত্ত পরিসরের জন্য অনুভূমিক (বাম থেকে ডানে) প্রান্তিককরণ সেট করুন (বাম/কেন্দ্র/ডান)।
set Horizontal Alignments(alignments) Range অনুভূমিক প্রান্তিককরণের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে।
set Note(note) Range প্রদত্ত মান নোট সেট করে.
set Notes(notes) Range নোটের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রার সাথে অবশ্যই মিলতে হবে)।
set Number Format(numberFormat) Range প্রদত্ত ফর্ম্যাটিং স্ট্রিংয়ে নম্বর বা তারিখ বিন্যাস সেট করে।
set Number Formats(numberFormats) Range সংখ্যা বা তারিখ বিন্যাসের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মেলে)।
set Rich Text Value(value) Range পরিসরের ঘরগুলির জন্য রিচ টেক্সট মান সেট করে।
set Rich Text Values(values) Range রিচ টেক্সট মানগুলির একটি আয়তক্ষেত্রাকার গ্রিড সেট করে।
set Show Hyperlink(showHyperlink) Range পরিসর হাইপারলিঙ্ক দেখাবে কি না তা সেট করে।
set Text Direction(direction) Range পরিসরের কক্ষগুলির জন্য পাঠ্যের দিকনির্দেশ সেট করে।
set Text Directions(directions) Range পাঠ্য দিকনির্দেশের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে।
set Text Rotation(degrees) Range পরিসরের কক্ষগুলির জন্য পাঠ্য ঘূর্ণন সেটিংস সেট করে।
set Text Rotation(rotation) Range পরিসরের কক্ষগুলির জন্য পাঠ্য ঘূর্ণন সেটিংস সেট করে।
set Text Rotations(rotations) Range পাঠ্য ঘূর্ণনের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে।
set Text Style(style) Range পরিসরের ঘরগুলির জন্য পাঠ্য শৈলী সেট করে।
set Text Styles(styles) Range পাঠ্য শৈলীগুলির একটি আয়তক্ষেত্রাকার গ্রিড সেট করে।
set Value(value) Range পরিসরের মান নির্ধারণ করে।
set Values(values) Range মানগুলির একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রার সাথে অবশ্যই মিলতে হবে)।
set Vertical Alignment(alignment) Range প্রদত্ত পরিসরের জন্য উল্লম্ব (উপর থেকে নীচে) প্রান্তিককরণ সেট করুন (শীর্ষ/মাঝে/নীচ)।
set Vertical Alignments(alignments) Range উল্লম্ব প্রান্তিককরণের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রার সাথে অবশ্যই মিলতে হবে)।
set Vertical Text(isVertical) Range পরিসরের কক্ষগুলির জন্য পাঠ্য স্ট্যাক করা হবে কিনা তা সেট করে।
set Wrap(isWrapEnabled) Range প্রদত্ত পরিসরের ঘরের মোড়ক সেট করুন।
set Wrap Strategies(strategies) Range মোড়ানো কৌশলগুলির একটি আয়তক্ষেত্রাকার গ্রিড সেট করে।
set Wrap Strategy(strategy) Range পরিসরের কক্ষগুলির জন্য পাঠ্য মোড়ানোর কৌশল সেট করে।
set Wraps(isWrapEnabled) Range শব্দ মোড়ানো নীতিগুলির একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (এই পরিসরের মাত্রা অবশ্যই মেলে)।
shift Column Group Depth(delta) Range নির্দিষ্ট পরিমাণ দ্বারা পরিসরের কলাম গ্রুপিং গভীরতা পরিবর্তন করে।
shift Row Group Depth(delta) Range নির্দিষ্ট পরিমাণ দ্বারা পরিসরের সারি গ্রুপিং গভীরতা পরিবর্তন করে।
sort(sortSpecObj) Range কলাম এবং নির্দিষ্ট ক্রম অনুসারে প্রদত্ত পরিসরে ঘরগুলিকে সাজায়৷
split Text To Columns() void একটি স্বয়ংক্রিয়-সনাক্ত ডিলিমিটারের উপর ভিত্তি করে পাঠ্যের একটি কলামকে একাধিক কলামে বিভক্ত করে।
split Text To Columns(delimiter) void একটি কাস্টম বিভেদক হিসাবে নির্দিষ্ট স্ট্রিং ব্যবহার করে পাঠ্যের একটি কলামকে একাধিক কলামে বিভক্ত করে।
split Text To Columns(delimiter) void নির্দিষ্ট ডিলিমিটারের উপর ভিত্তি করে পাঠ্যের একটি কলামকে একাধিক কলামে বিভক্ত করে।
trim Whitespace() Range এই পরিসরের প্রতিটি ঘরে সাদা স্থান (যেমন স্পেস, ট্যাব বা নতুন লাইন) ছাঁটাই করে।
uncheck() Range পরিসরের চেকবক্সগুলির অবস্থা "আনচেক করা" এ পরিবর্তন করে।

বিস্তারিত ডকুমেন্টেশন

activate()

current cell হিসাবে ব্যাপ্তির উপরের বাম কক্ষের সাথে active range হিসাবে নির্দিষ্ট পরিসর সেট করে।

const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
const range = sheet.getRange('A1:D10');
range.activate();

const selection = sheet.getSelection();
// Current cell: A1
const currentCell = selection.getCurrentCell();
// Active Range: A1:D10
const activeRange = selection.getActiveRange();

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।


activate As Current Cell()

নির্দিষ্ট ঘরটিকে current cell হিসাবে সেট করে।

যদি নির্দিষ্ট কক্ষটি একটি বিদ্যমান পরিসরে উপস্থিত থাকে, তাহলে সেই পরিসরটি বর্তমান কোষ হিসাবে কোষের সাথে সক্রিয় পরিসরে পরিণত হয়।

যদি নির্দিষ্ট ঘরটি বিদ্যমান কোনো পরিসরে উপস্থিত না থাকে, তাহলে বিদ্যমান নির্বাচনটি সরানো হয় এবং সেলটি বর্তমান কোষ এবং সক্রিয় পরিসরে পরিণত হয়।

দ্রষ্টব্য: নির্দিষ্ট Range অবশ্যই একটি ঘর থাকতে হবে, অন্যথায় এটি একটি ব্যতিক্রম নিক্ষেপ করে।

// Gets the first sheet of the spreadsheet.
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];

// Gets the cell B5 and sets it as the active cell.
const range = sheet.getRange('B5');
const currentCell = range.activateAsCurrentCell();

// Logs the activated cell.
console.log(currentCell.getA1Notation());

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

add Developer Metadata(key)

পরিসরে নির্দিষ্ট কী দিয়ে বিকাশকারী মেটাডেটা যোগ করে।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets row 2 on the sheet.
const range = sheet.getRange('2:2');

// Adds the key 'NAME' to the developer metadata for row 2.
range.addDeveloperMetadata('NAME');

// Gets the metadata and logs it to the console.
const developerMetaData = range.getDeveloperMetadata()[0];
console.log(developerMetaData.getKey());

পরামিতি

নাম টাইপ বর্ণনা
key String নতুন ডেভেলপার মেটাডেটার জন্য কী।

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

add Developer Metadata(key, visibility)

নির্দিষ্ট কী এবং পরিসরে দৃশ্যমানতার সাথে বিকাশকারী মেটাডেটা যোগ করে।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets row 2 on Sheet1.
const range = sheet.getRange('2:2');

// Adds the key 'NAME' and sets the developer metadata visibility to 'DOCUMENT'
// for row 2 on Sheet1.
range.addDeveloperMetadata(
    'NAME',
    SpreadsheetApp.DeveloperMetadataVisibility.DOCUMENT,
);

// Gets the updated metadata info and logs it to the console.
const developerMetaData = range.getDeveloperMetadata()[0];
console.log(developerMetaData.getKey());
console.log(developerMetaData.getVisibility().toString());

পরামিতি

নাম টাইপ বর্ণনা
key String নতুন ডেভেলপার মেটাডেটার জন্য কী।
visibility Developer Metadata Visibility নতুন ডেভেলপার মেটাডেটার দৃশ্যমানতা।

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

add Developer Metadata(key, value)

পরিসরে নির্দিষ্ট কী এবং মান সহ বিকাশকারী মেটাডেটা যোগ করে।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets row 2 of Sheet1.
const range = sheet.getRange('2:2');

// Adds the key 'NAME' and sets the value to 'GOOGLE' for the metadata of row 2.
range.addDeveloperMetadata('NAME', 'GOOGLE');

// Gets the metadata and logs it to the console.
const developerMetaData = range.getDeveloperMetadata()[0];
console.log(developerMetaData.getKey());
console.log(developerMetaData.getValue());

পরামিতি

নাম টাইপ বর্ণনা
key String নতুন ডেভেলপার মেটাডেটার জন্য কী।
value String নতুন ডেভেলপার মেটাডেটার মান।

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

add Developer Metadata(key, value, visibility)

নির্দিষ্ট কী, মান এবং পরিসরে দৃশ্যমানতার সাথে বিকাশকারী মেটাডেটা যোগ করে।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets row 2 on the sheet.
const range = sheet.getRange('2:2');

// Adds the key 'NAME', sets the value to 'GOOGLE', and sets the visibility
// to PROJECT for row 2 on the sheet.
range.addDeveloperMetadata(
    'NAME',
    'GOOGLE',
    SpreadsheetApp.DeveloperMetadataVisibility.PROJECT,
);

// Gets the updated metadata info and logs it to the console.
const developerMetaData = range.getDeveloperMetadata()[0];
console.log(developerMetaData.getKey());
console.log(developerMetaData.getValue());
console.log(developerMetaData.getVisibility().toString());

পরামিতি

নাম টাইপ বর্ণনা
key String নতুন ডেভেলপার মেটাডেটার জন্য কী।
value String নতুন ডেভেলপার মেটাডেটার মান।
visibility Developer Metadata Visibility নতুন ডেভেলপার মেটাডেটার দৃশ্যমানতা।

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

apply Column Banding()

পরিসরে একটি ডিফল্ট কলাম ব্যান্ডিং থিম প্রয়োগ করে। ডিফল্টরূপে, ব্যান্ডিং-এ হেডার থাকে এবং ফুটারের রঙ থাকে না।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets row 2 on the sheet.
const range = sheet.getRange('2:2');

// Applies column banding to row 2.
const colBanding = range.applyColumnBanding();

// Gets the first banding on the sheet and logs the color of the header column.
console.log(
    sheet.getBandings()[0]
        .getHeaderColumnColorObject()
        .asRgbColor()
        .asHexString(),
);

// Gets the first banding on the sheet and logs the color of the second column.
console.log(
    sheet.getBandings()[0]
        .getSecondColumnColorObject()
        .asRgbColor()
        .asHexString(),
);

প্রত্যাবর্তন

Banding - নতুন ব্যান্ডিং।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

apply Column Banding(bandingTheme)

পরিসরে একটি নির্দিষ্ট কলাম ব্যান্ডিং থিম প্রয়োগ করে। ডিফল্টরূপে, ব্যান্ডিং-এ হেডার থাকে এবং ফুটারের রঙ থাকে না।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets row 2 on the sheet.
const range = sheet.getRange('2:2');

// Applies the INDIGO color banding theme to the columns in row 2.
const colBanding = range.applyColumnBanding(SpreadsheetApp.BandingTheme.INDIGO);

// Gets the first banding on the sheet and logs the color of the second column.
console.log(
    sheet.getBandings()[0]
        .getSecondColumnColorObject()
        .asRgbColor()
        .asHexString(),
);

পরামিতি

নাম টাইপ বর্ণনা
banding Theme Banding Theme পরিসরের কলামগুলিতে প্রয়োগ করার জন্য একটি রঙের থিম৷

প্রত্যাবর্তন

Banding - নতুন ব্যান্ডিং।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

apply Column Banding(bandingTheme, showHeader, showFooter)

নির্দিষ্ট হেডার এবং ফুটার সেটিংস সহ পরিসরে একটি নির্দিষ্ট কলাম ব্যান্ডিং থিম প্রয়োগ করে।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets rows 12-22 on the sheet.
const range = sheet.getRange('12:22');

// Applies the BLUE color banding theme to rows 12-22.
// Sets the header visibility to false and the footer visibility to true.
const colBanding = range.applyColumnBanding(
    SpreadsheetApp.BandingTheme.BLUE,
    false,
    true,
);

// Gets the banding color and logs it to the console.
console.log(
    sheet.getBandings()[0]
        .getSecondColumnColorObject()
        .asRgbColor()
        .asHexString(),
);

// Gets the header color object and logs it to the console. Returns null because
// the header visibility is set to false.
console.log(sheet.getBandings()[0].getHeaderColumnColorObject());

// Gets the footer color and logs it to the console.
console.log(
    sheet.getBandings()[0]
        .getFooterColumnColorObject()
        .asRgbColor()
        .asHexString(),
);

পরামিতি

নাম টাইপ বর্ণনা
banding Theme Banding Theme পরিসরের কলামগুলিতে প্রয়োগ করার জন্য একটি রঙের থিম৷
show Header Boolean true হলে, ব্যান্ডিং থিম হেডারের রঙ প্রথম কলামে প্রয়োগ করা হয়।
show Footer Boolean true হলে, ব্যান্ডিং থিম ফুটারের রঙ শেষ কলামে প্রয়োগ করা হয়।

প্রত্যাবর্তন

Banding - নতুন ব্যান্ডিং।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

apply Row Banding()

পরিসরে একটি ডিফল্ট সারি ব্যান্ডিং থিম প্রয়োগ করে৷ ডিফল্টরূপে, ব্যান্ডিং-এ হেডার থাকে এবং ফুটারের রঙ থাকে না।

// Opens the spreadsheet by its URL. If you created your script from within a
// Google Sheets spreadsheet, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets rows 1-30 on Sheet1.
const range = sheet.getRange('1:30');

// Applies row banding to rows 1-30.
range.applyRowBanding();

// Gets the hex color of the second banded row.
const secondRowColor =
    range.getBandings()[0].getSecondRowColorObject().asRgbColor().asHexString();

// Logs the hex color to console.
console.log(secondRowColor);

প্রত্যাবর্তন

Banding - ব্যান্ডিং।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

apply Row Banding(bandingTheme)

পরিসরে একটি নির্দিষ্ট সারি ব্যান্ডিং থিম প্রয়োগ করে। ডিফল্টরূপে, ব্যান্ডিং-এ হেডার থাকে এবং ফুটারের রঙ থাকে না।

// Opens the spreadsheet by its URL. If you created your script from within a
// Google Sheets spreadsheet, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets rows 1-30 on Sheet1.
const range = sheet.getRange('1:30');

// Applies the INDIGO row banding theme to rows 1-30.
range.applyRowBanding(SpreadsheetApp.BandingTheme.INDIGO);

// Gets the hex color of the second banded row.
const secondRowColor =
    range.getBandings()[0].getSecondRowColorObject().asRgbColor().asHexString();

// Logs the hex color to console.
console.log(secondRowColor);

পরামিতি

নাম টাইপ বর্ণনা
banding Theme Banding Theme পরিসরের সারিগুলিতে প্রয়োগ করার জন্য একটি রঙের থিম৷

প্রত্যাবর্তন

Banding - নতুন ব্যান্ডিং।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

apply Row Banding(bandingTheme, showHeader, showFooter)

নির্দিষ্ট হেডার এবং ফুটার সেটিংস সহ পরিসরে একটি নির্দিষ্ট সারি ব্যান্ডিং থিম প্রয়োগ করে৷

// Opens the spreadsheet by its URL. If you created your script from within a
// Google Sheets spreadsheet, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets rows 1-30 on Sheet1.
const range = sheet.getRange('1:30');

// Applies the INDIGO row banding to rows 1-30 and
// specifies to hide the header and show the footer.
range.applyRowBanding(SpreadsheetApp.BandingTheme.INDIGO, false, true);

পরামিতি

নাম টাইপ বর্ণনা
banding Theme Banding Theme পরিসরের সারিগুলিতে প্রয়োগ করার জন্য একটি রঙের থিম৷
show Header Boolean true হলে, ব্যান্ডিং থিম হেডারের রঙ প্রথম সারিতে প্রয়োগ করা হয়।
show Footer Boolean true হলে, ব্যান্ডিং থিম ফুটারের রঙ শেষ সারিতে প্রয়োগ করা হয়।

প্রত্যাবর্তন

Banding - নতুন ব্যান্ডিং।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

auto Fill(destination, series)

এই পরিসরের ডেটার উপর ভিত্তি করে ডেটা দিয়ে destination Range পূরণ করে। নতুন মানগুলিও নির্দিষ্ট series ধরন দ্বারা নির্ধারিত হয়। গন্তব্য পরিসরে অবশ্যই এই পরিসীমা থাকতে হবে এবং এটিকে শুধুমাত্র একটি দিকে প্রসারিত করতে হবে। উদাহরণস্বরূপ, A1:A20 A1:A4 A20 পূরণ করে:

const sheet = SpreadsheetApp.getActiveSheet();

// Has values [1, 2, 3, 4].
const sourceRange = sheet.getRange('A1:A4');
// The range to fill with values.
const destination = sheet.getRange('A1:A20');

// Inserts new values in A5:A20, continuing the pattern expressed in A1:A4
sourceRange.autoFill(destination, SpreadsheetApp.AutoFillSeries.DEFAULT_SERIES);

পরামিতি

নাম টাইপ বর্ণনা
destination Range মান দিয়ে স্বয়ংক্রিয়ভাবে পূরণ করা পরিসর। গন্তব্য পরিসরে এই পরিসীমা থাকা উচিত এবং এটিকে শুধুমাত্র একটি দিকে প্রসারিত করা উচিত (উপরের দিকে, নীচের দিকে, বাম দিকে বা ডানদিকে)।
series Auto Fill Series অটোফিল সিরিজের ধরন যা নতুন মান গণনা করতে ব্যবহার করা উচিত। এই সিরিজের প্রভাব উৎস তথ্যের ধরন এবং পরিমাণের উপর ভিত্তি করে ভিন্ন।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

auto Fill To Neighbor(series)

প্রতিবেশী কক্ষের উপর ভিত্তি করে নতুন ডেটা দিয়ে পূরণ করার জন্য একটি ব্যাপ্তি গণনা করে এবং এই পরিসরে থাকা ডেটার উপর ভিত্তি করে স্বয়ংক্রিয়ভাবে সেই পরিসরটিকে নতুন মান দিয়ে পূরণ করে৷ এই নতুন মানগুলিও নির্দিষ্ট series ধরন দ্বারা নির্ধারিত হয়।

গণনা করা গন্তব্য পরিসর নতুন মানগুলি কোথায় সন্নিবেশ করা উচিত তা নির্ধারণ করতে আশেপাশের ডেটা বিবেচনা করে: যদি স্বয়ংক্রিয়ভাবে ভর্তি হওয়া একটি কলামের অবিলম্বে বাম বা ডানে ডেটা থাকে তবে নতুন মানগুলি শুধুমাত্র এই সন্নিহিত ডেটা পর্যন্ত প্রসারিত হয়৷

উদাহরণস্বরূপ, যদি A1:A20 ক্রমবর্ধমান সংখ্যার একটি সিরিজ দিয়ে পূর্ণ হয় এবং এই পদ্ধতিটি B1:B4 পরিসরে কল করা হয় যাতে তারিখগুলির একটি সিরিজ রয়েছে, নতুন মানগুলি শুধুমাত্র B5:B20 এ ঢোকানো হয়। এইভাবে, এই নতুন মানগুলি কলাম A-তে মান ধারণ করে এমন কক্ষগুলিতে "লাঠি"।

const sheet = SpreadsheetApp.getActiveSheet();

// A1:A20 has values [1, 2, 3, ... 20].
// B1:B4 has values [1/1/2017, 1/2/2017, ...]
const sourceRange = sheet.getRange('B1:B4');

// Results in B5:B20 having values [1/5/2017, ... 1/20/2017]
sourceRange.autoFillToNeighbor(SpreadsheetApp.AutoFillSeries.DEFAULT_SERIES);

পরামিতি

নাম টাইপ বর্ণনা
series Auto Fill Series অটোফিল সিরিজের ধরন যা নতুন মান গণনা করতে ব্যবহার করা উচিত। এই সিরিজের প্রভাব উৎস তথ্যের ধরন এবং পরিমাণের উপর ভিত্তি করে ভিন্ন।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

break Apart()

রেঞ্জের যেকোন মাল্টি-কলাম সেলকে আবার আলাদা কক্ষে ভেঙে দিন।

এই ফাংশনটিকে একটি পরিসরে কল করা একটি পরিসর নির্বাচন করা এবং বিন্যাস > কোষ একত্রিত করুন > আনমার্জ করুন ক্লিক করার সমতুল্য।

// Opens the spreadsheet by its URL. If you created your script from within a
// Google Sheets spreadsheet, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:C6 on Sheet1.
const range = sheet.getRange('A1:C6');

// Unmerges the range A1:C6 into individual cells.
range.breakApart();

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

can Edit()

ব্যবহারকারীর পরিসরের প্রতিটি কক্ষ সম্পাদনা করার অনুমতি আছে কিনা তা নির্ধারণ করে। স্প্রেডশীটের মালিক সর্বদা সুরক্ষিত রেঞ্জ এবং শীট সম্পাদনা করতে সক্ষম।

// Opens the spreadsheet by its URL. If you created your script from within a
// Google Sheets spreadsheet, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:C6 on Sheet1.
const range = sheet.getRange('A1:C6');

// Logs whether the user has permission to edit every cell in the range.
console.log(range.canEdit());

প্রত্যাবর্তন

Booleantrue যদি ব্যবহারকারীর পরিসরের প্রতিটি ঘর সম্পাদনা করার অনুমতি থাকে; অন্যথায় false

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

check()

পরিসরের চেকবক্সগুলির অবস্থা "চেক করা" এ পরিবর্তন করে। পরিসরের ঘরগুলিকে উপেক্ষা করে যা বর্তমানে কনফিগার করা চেক করা বা আনচেক করা মান ধারণ করে না৷

// Changes the state of cells which currently contain either the checked or
// unchecked value configured in the range A1:B10 to 'checked'.
const range = SpreadsheetApp.getActive().getRange('A1:B10');
range.check();

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

clear()

বিষয়বস্তু এবং বিন্যাস পরিসীমা সাফ করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('A1:D10');
range.clear();

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

clear(options)

প্রদত্ত উন্নত বিকল্পগুলির সাথে নির্দিষ্ট করা বিষয়বস্তু, বিন্যাস, ডেটা যাচাইকরণের নিয়ম এবং/অথবা মন্তব্যের পরিসর সাফ করে। ডিফল্টরূপে সমস্ত ডেটা সাফ করা হয়।

// The code below clears range C2:G7 in the active sheet, but preserves the
// format, data validation rules, and comments.
SpreadsheetApp.getActiveSheet().getRange(2, 3, 6, 5).clear({
  contentsOnly: true
});

পরামিতি

নাম টাইপ বর্ণনা
options Object একটি জাভাস্ক্রিপ্ট অবজেক্ট যা উন্নত পরামিতি নির্দিষ্ট করে, যেমন নীচে তালিকাভুক্ত করা হয়েছে।

উন্নত পরামিতি

নাম টাইপ বর্ণনা
comments Only Boolean শুধু মন্তব্য ক্লিয়ার করতে হবে কিনা।
contents Only Boolean শুধুমাত্র বিষয়বস্তু পরিষ্কার করতে হবে কিনা.
format Only Boolean শুধুমাত্র বিন্যাস পরিষ্কার করতে হবে কিনা; নোট করুন যে ক্লিয়ারিং ফরম্যাট ডেটা যাচাইকরণের নিয়মগুলিও সাফ করে।
validations Only Boolean শুধুমাত্র ডেটা যাচাইকরণের নিয়মগুলি সাফ করতে হবে কিনা।
skip Filtered Rows Boolean ফিল্টার করা সারি সাফ করা এড়াতে হবে কিনা।

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

clear Content()

বিন্যাস অক্ষত রেখে পরিসরের বিষয়বস্তু সাফ করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('A1:D10');
range.clearContent();

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

clear Data Validations()

পরিসরের জন্য ডেটা যাচাইকরণের নিয়মগুলি সাফ করে।

// Clear the data validation rules for cells A1:B5.
const range = SpreadsheetApp.getActive().getRange('A1:B5');
range.clearDataValidations();

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

clear Format()

এই ব্যাপ্তির জন্য বিন্যাস সাফ করে।

এটি পরিসরের ঘর বা কক্ষের জন্য পাঠ্য বিন্যাস সাফ করে, কিন্তু কোনো সংখ্যা বিন্যাস নিয়ম পুনরায় সেট করে না।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('A1:D10');
range.clearFormat();

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

clear Note()

প্রদত্ত ঘর বা কক্ষের নোটটি সাফ করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('A1:D10');
range.clearNote();

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

collapse Groups()

পরিসরের মধ্যে সম্পূর্ণরূপে থাকা সমস্ত গোষ্ঠীকে সঙ্কুচিত করে৷ যদি কোনও গোষ্ঠী সম্পূর্ণরূপে পরিসরের মধ্যে না থাকে, তবে গভীরতম প্রসারিত গোষ্ঠীটি আংশিকভাবে সীমার মধ্যে ভেঙে পড়ে।

const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
const range = sheet.getActiveRange();

// All row and column groups within the range are collapsed.
range.collapseGroups();

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

copy Format To Range(gridId, column, columnEnd, row, rowEnd)

প্রদত্ত অবস্থানে পরিসরের বিন্যাস অনুলিপি করুন। যদি গন্তব্যটি উত্স পরিসরের চেয়ে বড় বা ছোট হয় তবে উত্সটি সেই অনুসারে পুনরাবৃত্তি বা কাটা হয়। মনে রাখবেন যে এই পদ্ধতিটি শুধুমাত্র ফরম্যাটিং কপি করে।

গ্রিডআইডি প্যারামিটারের বিশদ বিবরণের জন্য, get Grid Id() দেখুন।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const source = ss.getSheets()[0];

const range = source.getRange('B2:D4');

// This copies the formatting in B2:D4 in the source sheet to
// D4:F6 in the sheet with gridId 1555299895. Note that you can get the gridId
// of a sheet by calling sheet.getSheetId() or range.getGridId().
range.copyFormatToRange(1555299895, 4, 6, 4, 6);

পরামিতি

নাম টাইপ বর্ণনা
grid Id Integer অবস্থান নির্বিশেষে স্প্রেডশীটের মধ্যে শীটের অনন্য আইডি।
column Integer লক্ষ্য পরিসরের প্রথম কলাম।
column End Integer লক্ষ্য পরিসরের শেষ কলাম।
row Integer লক্ষ্য পরিসরের শুরু সারি।
row End Integer লক্ষ্য পরিসরের শেষ সারি।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

এছাড়াও দেখুন


copy Format To Range(sheet, column, columnEnd, row, rowEnd)

প্রদত্ত অবস্থানে পরিসরের বিন্যাস অনুলিপি করুন। যদি গন্তব্যটি উত্স পরিসরের চেয়ে বড় বা ছোট হয় তবে উত্সটি সেই অনুসারে পুনরাবৃত্তি বা কাটা হয়। মনে রাখবেন যে এই পদ্ধতিটি শুধুমাত্র ফরম্যাটিং কপি করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const source = ss.getSheets()[0];
const destination = ss.getSheets()[1];

const range = source.getRange('B2:D4');

// This copies the formatting in B2:D4 in the source sheet to
// D4:F6 in the second sheet
range.copyFormatToRange(destination, 4, 6, 4, 6);

পরামিতি

নাম টাইপ বর্ণনা
sheet Sheet লক্ষ্য পত্রক.
column Integer লক্ষ্য পরিসরের প্রথম কলাম।
column End Integer লক্ষ্য পরিসরের শেষ কলাম।
row Integer লক্ষ্য পরিসরের শুরু সারি।
row End Integer লক্ষ্য পরিসরের শেষ সারি।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

copy To(destination)

কোষের একটি পরিসর থেকে কোষের অন্য পরিসরে ডেটা অনুলিপি করে। মান এবং বিন্যাস উভয় অনুলিপি করা হয়.

// The code below copies the first 5 columns over to the 6th column.
const sheet = SpreadsheetApp.getActiveSheet();
const rangeToCopy = sheet.getRange(1, 1, sheet.getMaxRows(), 5);
rangeToCopy.copyTo(sheet.getRange(1, 6));

পরামিতি

নাম টাইপ বর্ণনা
destination Range অনুলিপি করার জন্য একটি গন্তব্য পরিসর; শুধুমাত্র উপরের-বাম কক্ষের অবস্থান প্রাসঙ্গিক।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

copy To(destination, copyPasteType, transposed)

কোষের একটি পরিসর থেকে কোষের অন্য পরিসরে ডেটা অনুলিপি করে।

// The code below copies only the values of the first 5 columns over to the 6th
// column.
const sheet = SpreadsheetApp.getActiveSheet();
sheet.getRange('A:E').copyTo(
    sheet.getRange('F1'),
    SpreadsheetApp.CopyPasteType.PASTE_VALUES,
    false,
);

পরামিতি

নাম টাইপ বর্ণনা
destination Range অনুলিপি করার জন্য একটি গন্তব্য পরিসর; শুধুমাত্র উপরের-বাম কক্ষের অবস্থান প্রাসঙ্গিক।
copy Paste Type Copy Paste Type একটি প্রকার যা নির্দিষ্ট করে কিভাবে পরিসরের বিষয়বস্তু গন্তব্যে আটকানো হয়।
transposed Boolean পরিসরটি তার ট্রান্সপোজড ওরিয়েন্টেশনে আটকানো উচিত কিনা।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

copy To(destination, options)

কোষের একটি পরিসর থেকে কোষের অন্য পরিসরে ডেটা অনুলিপি করে। ডিফল্টরূপে মান এবং বিন্যাস উভয়ই অনুলিপি করা হয়, তবে এটি উন্নত আর্গুমেন্ট ব্যবহার করে ওভাররাইড করা যেতে পারে।

// The code below copies only the values of the first 5 columns over to the 6th
// column.
const sheet = SpreadsheetApp.getActiveSheet();
sheet.getRange('A:E').copyTo(sheet.getRange('F1'), {contentsOnly: true});

পরামিতি

নাম টাইপ বর্ণনা
destination Range অনুলিপি করার জন্য একটি গন্তব্য পরিসর; শুধুমাত্র উপরের-বাম কক্ষের অবস্থান প্রাসঙ্গিক।
options Object একটি জাভাস্ক্রিপ্ট অবজেক্ট যা উন্নত পরামিতি নির্দিষ্ট করে, যেমন নীচে তালিকাভুক্ত করা হয়েছে।

উন্নত পরামিতি

নাম টাইপ বর্ণনা
format Only Boolean নির্দেশ করে যে শুধুমাত্র বিন্যাসটি অনুলিপি করা উচিত
contents Only Boolean মনোনীত করে যে শুধুমাত্র বিষয়বস্তু অনুলিপি করা উচিত

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

copy Values To Range(gridId, column, columnEnd, row, rowEnd)

প্রদত্ত অবস্থানে পরিসরের বিষয়বস্তু অনুলিপি করুন। যদি গন্তব্যটি উত্স পরিসরের চেয়ে বড় বা ছোট হয় তবে উত্সটি সেই অনুসারে পুনরাবৃত্তি বা কাটা হয়।

গ্রিডআইডি প্যারামিটারের বিশদ বিবরণের জন্য, get Grid Id() দেখুন।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const source = ss.getSheets()[0];

const range = source.getRange('B2:D4');

// This copies the data in B2:D4 in the source sheet to
// D4:F6 in the sheet with gridId 0
range.copyValuesToRange(0, 4, 6, 4, 6);

পরামিতি

নাম টাইপ বর্ণনা
grid Id Integer অবস্থান নির্বিশেষে স্প্রেডশীটের মধ্যে শীটের অনন্য আইডি।
column Integer লক্ষ্য পরিসরের প্রথম কলাম।
column End Integer লক্ষ্য পরিসরের শেষ কলাম।
row Integer লক্ষ্য পরিসরের শুরু সারি।
row End Integer লক্ষ্য পরিসরের শেষ সারি।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

এছাড়াও দেখুন


copy Values To Range(sheet, column, columnEnd, row, rowEnd)

প্রদত্ত অবস্থানে পরিসরের বিষয়বস্তু অনুলিপি করুন। যদি গন্তব্যটি উত্স পরিসরের চেয়ে বড় বা ছোট হয় তবে উত্সটি সেই অনুসারে পুনরাবৃত্তি বা কাটা হয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const source = ss.getSheets()[0];
const destination = ss.getSheets()[1];

const range = source.getRange('B2:D4');

// This copies the data in B2:D4 in the source sheet to
// D4:F6 in the second sheet
range.copyValuesToRange(destination, 4, 6, 4, 6);

পরামিতি

নাম টাইপ বর্ণনা
sheet Sheet লক্ষ্য পত্রক.
column Integer লক্ষ্য পরিসরের প্রথম কলাম।
column End Integer লক্ষ্য পরিসরের শেষ কলাম।
row Integer লক্ষ্য পরিসরের শুরু সারি।
row End Integer লক্ষ্য পরিসরের শেষ সারি।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

create Data Source Pivot Table(dataSource)

ডেটা উৎস থেকে একটি খালি ডেটা সোর্স পিভট টেবিল তৈরি করে, এই রেঞ্জের প্রথম কক্ষে অ্যাঙ্কর করা হয়।

এই উদাহরণটি দেখায় কিভাবে একটি নতুন ডেটা সোর্স পিভট টেবিল তৈরি এবং কনফিগার করতে হয়।

const spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
const anchorCell = spreadsheet.getSheets()[0].getRange('A1');
const dataSource = spreadsheet.getDataSources()[0];

const pivotTable = anchorCell.createDataSourcePivotTable(dataSource);
pivotTable.addRowGroup('dataColumnA');
pivotTable.addColumnGroup('dataColumnB');
pivotTable.addPivotValue(
    'dataColumnC',
    SpreadsheetApp.PivotTableSummarizeFunction.SUM,
);
pivotTable.addFilter(
    'dataColumnA',
    SpreadsheetApp.newFilterCriteria().whenTextStartsWith('A').build(),
);

পরামিতি

নাম টাইপ বর্ণনা
data Source Data Source যে ডেটা উৎস থেকে পিভট টেবিল তৈরি করা হবে।

প্রত্যাবর্তন

Data Source Pivot Table — নতুন তৈরি করা ডেটা সোর্স পিভট টেবিল।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

create Data Source Table(dataSource)

এই পরিসরের প্রথম কক্ষে নোঙর করা ডেটা উৎস থেকে একটি খালি ডেটা উৎস টেবিল তৈরি করে।

এই উদাহরণটি দেখায় কিভাবে একটি নতুন ডেটা সোর্স টেবিল তৈরি এবং কনফিগার করতে হয়।

const spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
const anchorCell = spreadsheet.getSheets()[0].getRange('A1');
const dataSource = spreadsheet.getDataSources()[0];

const dataSourceTable =
    anchorCell.createDataSourceTable(dataSource)
        .addColumns('dataColumnA', 'dataColumnB', 'dataColumnC')
        .addSortSpec('dataColumnA', true)    // ascending=true
        .addSortSpec('dataColumnB', false);  // ascending=false

পরামিতি

নাম টাইপ বর্ণনা
data Source Data Source যে ডেটা উৎস থেকে পিভট টেবিল তৈরি করা হবে।

প্রত্যাবর্তন

Data Source Table — নতুন তৈরি করা ডাটা সোর্স টেবিল।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

create Developer Metadata Finder()

এই পরিসরের মধ্যে বিকাশকারী মেটাডেটা খোঁজার জন্য একটি DeveloperMetadataFinderApi প্রদান করে। মেটাডেটা কেবলমাত্র সেই পরিসরের মধ্যে সম্পূর্ণরূপে অন্তর্ভুক্ত থাকলেই পরিসরের সীমার মধ্যে থাকে৷ উদাহরণ স্বরূপ, '3:3' সারির সাথে যুক্ত মেটাডেটা 'A1:D5' রেঞ্জের মধ্যে নয় কিন্তু একটি রেঞ্জ '1:5' এর মধ্যে রয়েছে।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:C6.
const range = sheet.getRange('A1:C6');

// Creates a developer metadata finder to search for metadata in the scope of
// this range.
const developerMetaDataFinder = range.createDeveloperMetadataFinder();

// Logs information about the developer metadata finder to the console.
const developerMetaData = developerMetaDataFinder.find()[0];
console.log(developerMetaData.getKey());
console.log(developerMetaData.getValue());
console.log(developerMetaData.getVisibility().toString());

প্রত্যাবর্তন

Developer Metadata Finder — এই পরিসরের সুযোগে মেটাডেটা অনুসন্ধান করার জন্য একটি বিকাশকারী মেটাডেটা ফাইন্ডার।


create Filter()

একটি ফিল্টার তৈরি করে এবং শীটে নির্দিষ্ট পরিসরে এটি প্রয়োগ করে। আপনি একটি শীটে একাধিক ফিল্টার তৈরি করতে পারবেন না৷ আপনি এটি তৈরি করার পরে আপনার ফিল্টার অ্যাক্সেস এবং সংশোধন করতে, get Filter() বা Sheet.getFilter() ব্যবহার করুন।

const ss = SpreadsheetApp.getActiveSheet();
const range = ss.getRange('A1:C20');

// Creates a new filter and applies it to the range A1:C20 on the active sheet.
function createFilter() {
  range.createFilter();
}
// Gets the filter and applies criteria that only shows cells that aren't empty.
function getFilterAddCriteria() {
  const filter = range.getFilter();
  const criteria =
      SpreadsheetApp.newFilterCriteria().whenCellNotEmpty().build();
  filter.setColumnFilterCriteria(2, criteria);
}
Grid শীট, শীটের ডিফল্ট প্রকারের জন্য ফিল্টার তৈরি করতে এই পদ্ধতিটি ব্যবহার করুন। গ্রিড শীটগুলি এমন শীট যা একটি ডাটাবেসের সাথে সংযুক্ত নয়৷ অন্যান্য ধরণের ফিল্টার তৈরি করতে, নিম্নলিখিতগুলি পড়ুন:

প্রত্যাবর্তন

Filter - নতুন ফিল্টার।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

create Pivot Table(sourceData)

এই পরিসরের প্রথম কক্ষে নোঙর করা নির্দিষ্ট source Data থেকে একটি খালি পিভট টেবিল তৈরি করে।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets cell A1 as a range in order to place the pivot table.
const range = sheet.getRange('A1');

// Gets the range of the source data for the pivot table.
const dataRange = sheet.getRange('E12:G20');

// Creates an empty pivot table from the specified source data.
const pivotTable = range.createPivotTable(dataRange);

// Logs the values from the pivot table's source data to the console.
console.log(pivotTable.getSourceDataRange().getValues());

পরামিতি

নাম টাইপ বর্ণনা
source Data Range যে ডেটা থেকে পিভট টেবিল তৈরি করতে হবে।

প্রত্যাবর্তন

Pivot Table — নতুন তৈরি করা Pivot Table

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

create Text Finder(findText)

পরিসরের জন্য একটি পাঠ্য সন্ধানকারী তৈরি করে, যা এই পরিসরে পাঠ্য খুঁজে পেতে এবং প্রতিস্থাপন করতে পারে।

const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
const range = sheet.getActiveRange();

// Creates  a text finder for the range.
const textFinder = range.createTextFinder('dog');

// Returns the first occurrence of 'dog'.
const firstOccurrence = textFinder.findNext();

// Replaces the last found occurrence of 'dog' with 'cat' and returns the number
// of occurrences replaced.
const numOccurrencesReplaced = textFinder.replaceWith('cat');

পরামিতি

নাম টাইপ বর্ণনা
find Text String অনুসন্ধান করার জন্য পাঠ্য।

প্রত্যাবর্তন

Text Finder - পরিসরের জন্য Text Finder


delete Cells(shiftDimension)

কোষের এই পরিসীমা মুছে দেয়। প্রদত্ত মাত্রা বরাবর শীটে বিদ্যমান ডেটা মুছে ফেলা পরিসরের দিকে স্থানান্তরিত হয়৷

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('A1:D10');
range.deleteCells(SpreadsheetApp.Dimension.COLUMNS);

পরামিতি

নাম টাইপ বর্ণনা
shift Dimension Dimension বিদ্যমান ডেটা স্থানান্তর করার জন্য যে মাত্রা।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

expand Groups()

সঙ্কুচিত গোষ্ঠীগুলিকে প্রসারিত করে যার পরিসর বা নিয়ন্ত্রণ টগল এই ব্যাপ্তির সাথে ছেদ করে৷ কন্ট্রোল টগল লোকেশন হল সেই সূচক যেখানে কন্ট্রোল টগল দেখানো হয়, সেটিংসের উপর নির্ভর করে সরাসরি গ্রুপের আগে বা পরে। একই স্থানে একাধিক গোষ্ঠী থাকলে, অগভীর গোষ্ঠীটি প্রসারিত হয়।

const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
const range = sheet.getActiveRange();

// All row and column groups within the range are expanded.
range.expandGroups();

প্রত্যাবর্তন

Range — এই পরিসর, চেইনিংয়ের জন্য।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getA1Notation()

A1 স্বরলিপিতে, পরিসরের একটি স্ট্রিং বর্ণনা প্রদান করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange(1, 1, 2, 5);

// Logs "A1:E2"
Logger.log(range.getA1Notation());

প্রত্যাবর্তন

String — A1 স্বরলিপিতে পরিসরের স্ট্রিং বর্ণনা।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Background()

পরিসরে উপরের-বাম ঘরের পটভূমির রঙ ফেরত দেয় (উদাহরণস্বরূপ, '#ffffff' )।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B5');
Logger.log(cell.getBackground());

প্রত্যাবর্তন

String - পটভূমির রঙের কোড।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Background Object()

ব্যাপ্তির উপরের-বাম কক্ষের পটভূমির রঙ ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B5');
Logger.log(cell.getBackgroundObject().asRgbColor().asHexString());

প্রত্যাবর্তন

Color — পরিসরের উপরের-বাম ঘরের পটভূমির রঙ।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Background Objects()

পরিসরের কক্ষের পটভূমির রং ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B5:C6');
const bgColors = range.getBackgroundObjects();
for (const i in bgColors) {
  for (const j in bgColors[i]) {
    Logger.log(bgColors[i][j].asRgbColor().asHexString());
  }
}

প্রত্যাবর্তন

Color[][] — পটভূমির রঙের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Backgrounds()

পরিসরের কক্ষগুলির পটভূমির রং ফেরত দেয় (উদাহরণস্বরূপ, '#ffffff' )।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B5:C6');
const bgColors = range.getBackgrounds();
for (const i in bgColors) {
  for (const j in bgColors[i]) {
    Logger.log(bgColors[i][j]);
  }
}

প্রত্যাবর্তন

String[][] — ব্যাকগ্রাউন্ডের রঙিন কোডের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Bandings()

এই ব্যাপ্তির যেকোনো কক্ষে প্রয়োগ করা সমস্ত ব্যান্ডিং ফেরত দেয়।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Sets a range.
const range = sheet.getRange('A1:K50');

// Gets the banding info for the range.
const bandings = range.getBandings();

// Logs the second row color for each banding to the console.
for (const banding of bandings) {
  console.log(banding.getSecondRowColor());
}

প্রত্যাবর্তন

Banding[] — এই পরিসরের যেকোন কক্ষে প্রয়োগ করা সমস্ত ব্যান্ডিং।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Cell(row, column)

একটি পরিসরের মধ্যে একটি প্রদত্ত কক্ষ ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B2:D4');

// The row and column here are relative to the range
// getCell(1,1) in this code returns the cell at B2
const cell = range.getCell(1, 1);
Logger.log(cell.getValue());

পরামিতি

নাম টাইপ বর্ণনা
row Integer ব্যাপ্তির সাপেক্ষে ঘরের সারি।
column Integer ব্যাপ্তির সাপেক্ষে ঘরের কলাম।

প্রত্যাবর্তন

Range — নির্দিষ্ট স্থানাঙ্কে একটি একক কক্ষ ধারণকারী একটি পরিসর।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Column()

এই ব্যাপ্তির জন্য শুরুর কলামের অবস্থান ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B2:D4');
// Logs "2.0"
Logger.log(range.getColumn());

প্রত্যাবর্তন

Integer — স্প্রেডশীটে ব্যাপ্তির শুরুর কলামের অবস্থান।

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Data Region()

সমস্ত সংলগ্ন কক্ষগুলিকে ডেটা সহ কভার করতে চারটি মূল Direction প্রসারিত পরিসরের একটি অনুলিপি প্রদান করে৷ যদি ব্যাপ্তিটি খালি কক্ষ দ্বারা বেষ্টিত থাকে তবে কর্ণ বরাবর সেগুলি অন্তর্ভুক্ত না করে, পরিসরটি নিজেই ফিরে আসে। এটি সম্পাদকটিতে পরিসীমা নির্বাচন এবং Ctrl+A টাইপ করার অনুরূপ।

// Assume the active spreadsheet is blank.
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
sheet.getRange('C2').setValue(100);
sheet.getRange('B3').setValue(100);
sheet.getRange('D3').setValue(100);
sheet.getRange('C4').setValue(100);
// Logs "B2:D4"
Logger.log(sheet.getRange('C3').getDataRegion().getA1Notation());

প্রত্যাবর্তন

Range - রেঞ্জের ডেটা অঞ্চল বা পুরো স্প্রেডশিটের জন্য একটি ব্যাপ্তি।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Data Region(dimension)

পরিসীমা প্রসারিত Direction.UP Direction.NEXT Dimension.COLUMNS Direction.PREVIOUS Dimension.ROWS Direction.DOWN পরিসীমাটির সম্প্রসারণটি টেবিলের মতো সংগঠিত পরিসরের পাশের ডেটা সনাক্তকরণের উপর ভিত্তি করে। প্রসারিত পরিসীমাটি টেবিলের সীমানা সহ নির্দিষ্ট মাত্রা বরাবর ডেটা সহ সমস্ত সংলগ্ন কোষকে কভার করে। যদি মূল পরিসীমাটি নির্দিষ্ট মাত্রা বরাবর খালি কোষ দ্বারা বেষ্টিত থাকে তবে পরিসীমা নিজেই ফিরে আসে। এই পদ্ধতিটি সম্পাদকের সারিগুলির জন্য কলামগুলির জন্য Ctrl+Space বা Shift+Space টাইপ করার মতো এবং টাইপ করার অনুরূপ।

// Assume the active spreadsheet is blank.
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
sheet.getRange('C2').setValue(100);
sheet.getRange('B3').setValue(100);
sheet.getRange('D3').setValue(100);
sheet.getRange('C4').setValue(100);
// Logs "C2:C4"
Logger.log(
    sheet.getRange('C3')
        .getDataRegion(SpreadsheetApp.Dimension.ROWS)
        .getA1Notation(),
);
// Logs "B3:D3"
Logger.log(
    sheet.getRange('C3')
        .getDataRegion(SpreadsheetApp.Dimension.COLUMNS)
        .getA1Notation(),
);

পরামিতি

নাম টাইপ বর্ণনা
dimension Dimension পরিসীমা প্রসারিত করার জন্য মাত্রা।

প্রত্যাবর্তন

Range - রেঞ্জের ডেটা অঞ্চল বা প্রতিটি কলাম বা মূল পরিসীমা দ্বারা বিস্তৃত প্রতিটি সারি covering েকে রাখা একটি ব্যাপ্তি।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Data Source Formula()

রেঞ্জের প্রথম কক্ষের জন্য Data Source Formula ফেরত দেয় বা সেলটিতে কোনও ডেটা উত্স সূত্র না থাকে তবে null

// Opens the spreadsheet file by its ID. If you created your script from a
// Google Sheets file, use SpreadsheetApp.getActiveSpreadsheet().
// TODO(developer): Replace the ID with your own.
const ss = SpreadsheetApp.openById('abc123456');

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1 on Sheet1.
const range = sheet.getRange('A1');

// Gets the data source formula from cell A1.
const dataSourceFormula = range.getDataSourceFormula();

// Gets the formula.
const formula = dataSourceFormula.getFormula();

// Logs the formula.
console.log(formula);

প্রত্যাবর্তন

Data Source Formula - ঘরের জন্য Data Source Formula

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Data Source Formulas()

পরিসীমা কোষগুলির জন্য Data Source Formula গুলি প্রদান করে।

// Opens the spreadsheet file by its ID. If you created your script from a
// Google Sheets file, use SpreadsheetApp.getActiveSpreadsheet().
// TODO(developer): Replace the ID with your own.
const ss = SpreadsheetApp.openById('abc123456');

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:B5 on Sheet1.
const range = sheet.getRange('A1:B5');

// Gets an array of the data source formulas in the range A1:B5.
const dataSourceFormulas = range.getDataSourceFormulas();

// Logs the first formula in the array.
console.log(dataSourceFormulas[0].getFormula());

প্রত্যাবর্তন

Data Source Formula[] - Data Source Formula একটি অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Data Source Pivot Tables()

পরিসীমাটির সাথে ছেদ করে সমস্ত ডেটা উত্স পিভট টেবিলগুলি পায়।

// Opens the spreadsheet file by its ID. If you created your script from a
// Google Sheets file, use SpreadsheetApp.getActiveSpreadsheet().
// TODO(developer): Replace the ID with your own.
const ss = SpreadsheetApp.openById('abc123456');

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:G50 on Sheet1.
const range = sheet.getRange('A1:G50');

// Gets an array of the data source pivot tables in the range A1:G50.
const dataSourcePivotTables = range.getDataSourcePivotTables();

// Logs the last time that the first pivot table in the array was refreshed.
console.log(dataSourcePivotTables[0].getStatus().getLastRefreshedTime());

প্রত্যাবর্তন

Data Source Pivot Table[] - ডেটা উত্স পিভট টেবিলের একটি তালিকা।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Data Source Tables()

পরিসীমাটির সাথে ছেদ করে সমস্ত ডেটা উত্স টেবিলগুলি পায়।

// Opens the spreadsheet file by its ID. If you created your script from a
// Google Sheets file, use SpreadsheetApp.getActiveSpreadsheet().
// TODO(developer): Replace the ID with your own.
const ss = SpreadsheetApp.openById('abc123456');

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:G50 on Sheet1.
const range = sheet.getRange('A1:G50');

// Gets the first data source table in the range A1:G50.
const dataSourceTable = range.getDataSourceTables()[0];

// Logs the time of the last completed data execution on the data source table.
console.log(dataSourceTable.getStatus().getLastExecutionTime());

প্রত্যাবর্তন

Data Source Table[] - ডেটা উত্স টেবিলের একটি তালিকা।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Data Source Url()

এই ব্যাপ্তির ডেটার জন্য একটি URL ফেরত দেয়, যা চার্ট এবং প্রশ্নগুলি তৈরি করতে ব্যবহার করা যেতে পারে।

Code.gs

function doGet() {
  const ss = SpreadsheetApp.openById(
      '1khO6hBWTNNyvyyxvob7aoZTI9ZvlqqASNeq0e29Tw2c',
  );
  const sheet = ss.getSheetByName('ContinentData');
  const range = sheet.getRange('A1:B8');

  const template = HtmlService.createTemplateFromFile('piechart');
  template.dataSourceUrl = range.getDataSourceUrl();
  return template.evaluate();
}

piechart.html

<!DOCTYPE html>
<html>
  <head>
    <!--Load the AJAX API-->
    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script type="text/javascript">
      // Load the Visualization API and the corechart package.
      google.charts.load('current', {'packages': ['corechart']});

      // Set a callback to run when the Google Visualization API is loaded.
      google.charts.setOnLoadCallback(queryData);

      function queryData() {
        var query = new google.visualization.Query('<?= dataSourceUrl ?>');
        query.send(drawChart);
      }

      // Callback that creates and populates a data table,
      // instantiates the pie chart, passes in the data and
      // draws it.
      function drawChart(response) {
        if (response.isError()) {
          alert('Error: ' + response.getMessage() + ' ' + response.getDetailedMessage());
          return;
        }
        var data = response.getDataTable();

        // Set chart options.
        var options = {
          title: 'Population by Continent',
          width: 400,
          height: 300
        };

        // Instantiate and draw the chart, passing in some options.
        var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
    <!-- Div that holds the pie chart. -->
    <div id="chart_div"></div>
  </body>
</html>

প্রত্যাবর্তন

String - এই রেঞ্জের জন্য একটি ইউআরএল একটি ডেটা উত্স হিসাবে যা অন্যান্য এপিআই যেমন চার্টগুলিতে পাস করা যায়।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Data Table()

এই অবজেক্টের অভ্যন্তরে ডেটা একটি ডেটাটেবল হিসাবে ফিরিয়ে দিন।

// Opens the spreadsheet file by its ID. If you created your script from a
// Google Sheets file, use SpreadsheetApp.getActiveSpreadsheet().
// TODO(developer): Replace the ID with your own.
const ss = SpreadsheetApp.openById('abc123456');

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:B7 on Sheet1.
const range = sheet.getRange('A1:B7');

// Gets the range A1:B7 as a data table. The values in each column must be of
// the same type.
const datatable = range.getDataTable();

// Uses the Charts service to build a bar chart from the data table.
// This doesn't build an embedded chart. To do that, use
// sheet.newChart().addRange() instead.
const chart = Charts.newBarChart()
                  .setDataTable(datatable)
                  .setOption('title', 'Your Chart Title Here')
                  .build();

প্রত্যাবর্তন

Data Table - ডেটা একটি ডেটাটেবল হিসাবে।


get Data Table(firstRowIsHeader)

এই পরিসীমাটির অভ্যন্তরে ডেটা একটি ডেটাটেবল হিসাবে ফিরিয়ে দিন।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('A1:B7');

// Calling this method with "true" sets the first line to be the title of the
// axes
const datatable = range.getDataTable(true);

// Note that this doesn't build an EmbeddedChart, so you can't just use
// Sheet#insertChart(). To do that, use sheet.newChart().addRange() instead.
const chart = Charts.newBarChart()
                  .setDataTable(datatable)
                  .setOption('title', 'Your Title Here')
                  .build();

পরামিতি

নাম টাইপ বর্ণনা
first Row Is Header Boolean প্রথম সারিকে শিরোনাম হিসাবে বিবেচনা করা উচিত কিনা।

প্রত্যাবর্তন

Data Table - ডেটা একটি ডেটাটেবল হিসাবে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Data Validation()

পরিসীমা শীর্ষ-বাম কোষের জন্য ডেটা বৈধকরণ নিয়মটি ফেরত দেয়। যদি ডেটা বৈধতা কোষে সেট না করা থাকে তবে এই পদ্ধতিটি null হয়।

// Log information about the data validation rule for cell A1.
const cell = SpreadsheetApp.getActive().getRange('A1');
const rule = cell.getDataValidation();
if (rule != null) {
  const criteria = rule.getCriteriaType();
  const args = rule.getCriteriaValues();
  Logger.log('The data validation rule is %s %s', criteria, args);
} else {
  Logger.log('The cell does not have a data validation rule.');
}

প্রত্যাবর্তন

Data Validation -পরিসীমা শীর্ষ-বাম কোষের জন্য ডেটা বৈধকরণ নিয়ম।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Data Validations()

পরিসরের সমস্ত কোষের জন্য ডেটা বৈধতা বিধিগুলি প্রদান করে। যদি কোনও প্রদত্ত কক্ষে ডেটা বৈধতা সেট না করা থাকে তবে এই পদ্ধতিটি অ্যারেতে সেই ঘরের অবস্থানের জন্য null করে দেয়।

// Change existing data validation rules that require a date in 2013 to require
// a date in 2014.
const oldDates = [new Date('1/1/2013'), new Date('12/31/2013')];
const newDates = [new Date('1/1/2014'), new Date('12/31/2014')];
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange(1, 1, sheet.getMaxRows(), sheet.getMaxColumns());
const rules = range.getDataValidations();

for (let i = 0; i < rules.length; i++) {
  for (let j = 0; j < rules[i].length; j++) {
    const rule = rules[i][j];

    if (rule != null) {
      const criteria = rule.getCriteriaType();
      const args = rule.getCriteriaValues();

      if (criteria === SpreadsheetApp.DataValidationCriteria.DATE_BETWEEN &&
          args[0].getTime() === oldDates[0].getTime() &&
          args[1].getTime() === oldDates[1].getTime()) {
        // Create a builder from the existing rule, then change the dates.
        rules[i][j] = rule.copy().withCriteria(criteria, newDates).build();
      }
    }
  }
}
range.setDataValidations(rules);

প্রত্যাবর্তন

Data Validation[][] -পরিসরের কোষগুলির সাথে সম্পর্কিত ডেটা বৈধতা বিধিগুলির একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Developer Metadata()

এই ব্যাপ্তির সাথে যুক্ত বিকাশকারী মেটাডেটা পান।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets row 2 on Sheet1.
const range = sheet.getRange('2:2');

// Adds metadata to row 2.
range.addDeveloperMetadata('NAME', 'GOOGLE');

// Logs the metadata to console.
for (const metadata of range.getDeveloperMetadata()) {
  console.log(`${metadata.getKey()}: ${metadata.getValue()}`);
}

প্রত্যাবর্তন

Developer Metadata[] - এই পরিসীমাটির সাথে যুক্ত বিকাশকারী মেটাডেটা।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Display Value()

পরিসীমা শীর্ষ-বাম কোষের প্রদর্শিত মান প্রদান করে। মান একটি String । প্রদর্শিত মানটি অ্যাকাউন্টের তারিখ, সময় এবং মুদ্রা বিন্যাসের বিন্যাসে নেয়, স্প্রেডশিটের স্থানীয় সেটিং দ্বারা স্বয়ংক্রিয়ভাবে প্রয়োগ করা ফর্ম্যাটগুলি সহ। খালি কোষগুলি একটি খালি স্ট্রিং ফিরিয়ে দেয়।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets cell A30 and sets its value to 'Test code.'
const cell = sheet.getRange('A30');
cell.setValue('Test code');

// Gets the value and logs it to the console.
console.log(cell.getDisplayValue());

প্রত্যাবর্তন

String - এই কক্ষে প্রদর্শিত মান।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Display Values()

এই ব্যাপ্তির জন্য মানগুলির আয়তক্ষেত্রাকার গ্রিডটি প্রদান করে।

সারি দ্বারা সূচী, তারপরে কলাম দ্বারা প্রদর্শিত মানগুলির একটি দ্বি-মাত্রিক অ্যারে প্রদান করে। মানগুলি String অবজেক্ট। প্রদর্শিত মানটি স্প্রেডশিটের লোকেল সেটিং দ্বারা স্বয়ংক্রিয়ভাবে প্রয়োগ করা ফর্ম্যাটগুলি সহ অ্যাকাউন্টের তারিখ, সময় এবং মুদ্রার বিন্যাসে নেয়। খালি কোষগুলি অ্যারেতে একটি খালি স্ট্রিং দ্বারা প্রতিনিধিত্ব করা হয়। মনে রাখবেন যে একটি পরিসীমা সূচক 1, 1 এ শুরু হওয়ার সময়, জাভাস্ক্রিপ্ট অ্যারে [0][0] থেকে সূচী করা হয়।

// The code below gets the displayed values for the range C2:G8
// in the active spreadsheet.  Note that this is a JavaScript array.
const values =
    SpreadsheetApp.getActiveSheet().getRange(2, 3, 6, 4).getDisplayValues();
Logger.log(values[0][0]);

প্রত্যাবর্তন

String[][] -মানগুলির একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Filter()

শীটটিতে ফিল্টারটি ফেরত দেয় এই পরিসীমাটি অন্তর্ভুক্ত, বা যদি শীটে কোনও ফিল্টার না থাকে তবে null

const ss = SpreadsheetApp.getActiveSheet();
const range = ss.getRange('A1:C20');
// Gets the existing filter on the sheet that the given range belongs to.
const filter = range.getFilter();

প্রত্যাবর্তন

Filter - ফিল্টার।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Font Color Object()

পরিসরের শীর্ষ-বাম কোণে ঘরের ফন্ট রঙটি ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

Logger.log(range.getFontColorObject().asRgbColor().asHexString());

প্রত্যাবর্তন

Color -পরিসীমা শীর্ষ-বাম কোষের ফন্ট রঙ।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Font Color Objects()

পরিসীমা মধ্যে কোষগুলির ফন্ট রঙ প্রদান করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

const results = range.getFontColorObjects();

for (const i in results) {
  for (const j in results[i]) {
    Logger.log(results[i][j].asRgbColor().asHexString());
  }
}

প্রত্যাবর্তন

Color[][] -পরিসরের কোষগুলির সাথে যুক্ত ফন্ট রঙের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Font Families()

রেঞ্জের কোষগুলির ফন্ট পরিবারগুলিকে ফিরিয়ে দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

const results = range.getFontFamilies();

for (const i in results) {
  for (const j in results[i]) {
    Logger.log(results[i][j]);
  }
}

প্রত্যাবর্তন

String[][] -পরিসীমাগুলির কোষগুলির সাথে যুক্ত ফন্ট পরিবারের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Font Family()

পরিসরের শীর্ষ-বাম কোণে ঘরের ফন্ট পরিবারকে ফিরিয়ে দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

Logger.log(range.getFontFamily());

প্রত্যাবর্তন

String - ঘরের ফন্ট পরিবার।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Font Line()

রেঞ্জের শীর্ষ-বাম কোণে ঘরের লাইন স্টাইলটি পায় ( 'underline' , 'line-through' , বা 'none' )।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

Logger.log(range.getFontLine());

প্রত্যাবর্তন

String - ফন্ট লাইন।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Font Lines()

পরিসীমা ( 'underline' , 'line-through' , বা 'none' ) এর কোষগুলির লাইন স্টাইলটি পায়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

const results = range.getFontLines();

for (const i in results) {
  for (const j in results[i]) {
    Logger.log(results[i][j]);
  }
}

প্রত্যাবর্তন

String[][] -পরিসরের কোষগুলির সাথে যুক্ত ফন্ট লাইনের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Font Size()

পরিসরের শীর্ষ-বাম কোণে ঘরের পয়েন্ট আকারে ফন্টের আকারটি ফিরিয়ে দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

Logger.log(range.getFontSize());

প্রত্যাবর্তন

Integer - পয়েন্ট আকারে ফন্টের আকার।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Font Sizes()

পরিসরে কোষগুলির ফন্ট আকারগুলি ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

const results = range.getFontSizes();

for (const i in results) {
  for (const j in results[i]) {
    Logger.log(results[i][j]);
  }
}

প্রত্যাবর্তন

Integer[][] -পরিসরের কোষগুলির সাথে যুক্ত ফন্ট আকারের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Font Style()

পরিসরের শীর্ষ-বাম কোণে ঘরের ফন্ট স্টাইল ( 'italic' বা 'normal' ) প্রদান করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

Logger.log(range.getFontStyle());

প্রত্যাবর্তন

String - কোষে পাঠ্যের ফন্ট শৈলী।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Font Styles()

পরিসরে কোষগুলির ফন্ট শৈলীগুলি ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

const results = range.getFontStyles();

for (const i in results) {
  for (const j in results[i]) {
    Logger.log(results[i][j]);
  }
}

প্রত্যাবর্তন

String[][] -পরিসরের কোষগুলির সাথে সম্পর্কিত পাঠ্যের ফন্ট শৈলীর একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Font Weight()

পরিসরের শীর্ষ-বাম কোণে ঘরের ফন্ট ওজন (স্বাভাবিক/সাহসী) প্রদান করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

Logger.log(range.getFontWeight());

প্রত্যাবর্তন

String - কোষে পাঠ্যের ফন্ট ওজন।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Font Weights()

পরিসীমা কোষগুলির ফন্ট ওজন প্রদান করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

const results = range.getFontWeights();

for (const i in results) {
  for (const j in results[i]) {
    Logger.log(results[i][j]);
  }
}

প্রত্যাবর্তন

String[][] -পরিসরের কোষগুলির সাথে সম্পর্কিত পাঠ্যের ফন্ট ওজনের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Formula()

রেঞ্জের শীর্ষ-বাম কোষের জন্য সূত্র (এ 1 স্বরলিপি) বা সেলটি খালি থাকলে বা কোনও সূত্র না থাকে তবে একটি খালি স্ট্রিং দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// This assumes you have a function in B5 that sums up
// B2:B4
const range = sheet.getRange('B5');

// Logs the calculated value and the formula
Logger.log(
    'Calculated value: %s Formula: %s',
    range.getValue(),
    range.getFormula(),
);

প্রত্যাবর্তন

String - কোষের সূত্র।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Formula R1C1()

প্রদত্ত কক্ষের জন্য সূত্র (আর 1 সি 1 স্বরলিপি) প্রদান করে, বা যদি কোনওটি null

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B5');
const formula = range.getFormulaR1C1();
Logger.log(formula);

প্রত্যাবর্তন

String - আর 1 সি 1 স্বরলিপিতে সূত্র।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Formulas()

পরিসরের কোষগুলির জন্য সূত্রগুলি (এ 1 স্বরলিপি) প্রদান করে। 2 ডি অ্যারেতে এন্ট্রিগুলি কোনও সূত্র নেই এমন কোষগুলির জন্য খালি স্ট্রিং।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B5:C6');
const formulas = range.getFormulas();
for (const i in formulas) {
  for (const j in formulas[i]) {
    Logger.log(formulas[i][j]);
  }
}

প্রত্যাবর্তন

String[][] -স্ট্রিং ফর্ম্যাটে সূত্রের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Formulas R1C1()

পরিসরের কোষগুলির জন্য সূত্রগুলি (আর 1 সি 1 স্বরলিপি) প্রদান করে। 2 ডি অ্যারেতে এন্ট্রিগুলি কোনও সূত্র নেই এমন কোষগুলির জন্য null

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B5:C6');
const formulas = range.getFormulasR1C1();
for (const i in formulas) {
  for (const j in formulas[i]) {
    Logger.log(formulas[i][j]);
  }
}

প্রত্যাবর্তন

String[][] -আর 1 সি 1 স্বরলিপিতে সূত্রের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Grid Id()

রেঞ্জের মূল শীটের গ্রিড আইডি ফেরত দেয়। আইডিগুলি এলোমেলো অ-নেতিবাচক আইএনটি মান।

// Log the grid ID of the first sheet (by tab position) in the spreadsheet.
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

Logger.log(range.getGridId());

প্রত্যাবর্তন

Integer - প্যারেন্ট শিটের গ্রিড আইডি।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Height()

পরিসীমা উচ্চতা প্রদান করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B2:D4');
// logs 3.0
Logger.log(range.getHeight());

প্রত্যাবর্তন

Integer - পরিসীমা উচ্চতা।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Horizontal Alignment()

পরিসীমাটির শীর্ষ-বাম কোণে কোষের পাঠ্যের (বাম/কেন্দ্র/ডান) অনুভূমিক প্রান্তিককরণটি ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

Logger.log(range.getHorizontalAlignment());

প্রত্যাবর্তন

String - কোষে পাঠ্যের অনুভূমিক প্রান্তিককরণ।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Horizontal Alignments()

পরিসরের কোষগুলির অনুভূমিক প্রান্তিককরণগুলি ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

const results = range.getHorizontalAlignments();

for (const i in results) {
  for (const j in results[i]) {
    Logger.log(results[i][j]);
  }
}

প্রত্যাবর্তন

String[][] -পরিসরের কোষগুলির সাথে সম্পর্কিত পাঠ্যের অনুভূমিক প্রান্তিককরণের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Last Column()

শেষ কলামের অবস্থানটি ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B2:D4');
// Logs "4.0"
Logger.log(range.getLastColumn());

প্রত্যাবর্তন

Integer - স্প্রেডশিটে রেঞ্জের শেষ কলাম অবস্থান।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Last Row()

শেষ সারির অবস্থানটি ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B2:D4');
// Logs "4.0"
Logger.log(range.getLastRow());

প্রত্যাবর্তন

Integer - স্প্রেডশিটে রেঞ্জের শেষ সারি অবস্থান।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Merged Ranges()

মার্জ করা কোষগুলির প্রতিনিধিত্বকারী Range অবজেক্টগুলির একটি অ্যারে ফেরত দেয় যা হয় বর্তমান সীমার মধ্যে রয়েছে বা বর্তমান পরিসরে কমপক্ষে একটি কোষ ধারণ করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('A1:B3');

const mergedRanges = range.getMergedRanges();
for (let i = 0; i < mergedRanges.length; i++) {
  Logger.log(mergedRanges[i].getA1Notation());
  Logger.log(mergedRanges[i].getDisplayValue());
}

প্রত্যাবর্তন

Range[] - Range অবজেক্টের একটি অ্যারে, মার্জড কোষগুলি প্রতিনিধিত্ব করে রেঞ্জকে ওভারল্যাপ করে।


get Next Data Cell(direction)

রেঞ্জের প্রথম কলাম এবং সারি থেকে কোষ থেকে শুরু করে, পরবর্তী কক্ষটিকে প্রদত্ত দিকটিতে ফিরিয়ে দেয় যা তাদের মধ্যে ডেটা বা সেই দিকের স্প্রেডশিটের প্রান্তে কোষের সাথে কোষের একটি সংলগ্ন পরিসরের প্রান্ত। এটি সম্পাদকটিতে Ctrl+[arrow key] টাইপ করার সমতুল্য।

// Assume the active spreadsheet is blank.
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('C3:E5');
// Logs "C1"
Logger.log(range.getNextDataCell(SpreadsheetApp.Direction.UP).getA1Notation());

পরামিতি

নাম টাইপ বর্ণনা
direction Direction পরবর্তী ডেটা অঞ্চল প্রান্ত সেলটি সন্ধান করার জন্য যে দিকটি।

প্রত্যাবর্তন

Range - স্প্রেডশিটের প্রান্তে ডেটা অঞ্চল প্রান্ত সেল বা সেল।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Note()

প্রদত্ত রেঞ্জের সাথে সম্পর্কিত নোটটি ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

Logger.log(range.getNote());

প্রত্যাবর্তন

String - প্রদত্ত ঘরের সাথে সম্পর্কিত নোট।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Notes()

পরিসরের কোষগুলির সাথে সম্পর্কিত নোটগুলি ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

const results = range.getNotes();

for (const i in results) {
  for (const j in results[i]) {
    Logger.log(results[i][j]);
  }
}

প্রত্যাবর্তন

String[][] -পরিসরের কোষগুলির সাথে সম্পর্কিত নোটগুলির একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Num Columns()

এই ব্যাপ্তিতে কলামগুলির সংখ্যা প্রদান করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B2:D5');
Logger.log(range.getNumColumns());

প্রত্যাবর্তন

Integer - এই ব্যাপ্তিতে কলামগুলির সংখ্যা।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Num Rows()

এই ব্যাপ্তিতে সারি সংখ্যা প্রদান করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B2:D5');
Logger.log(range.getNumRows());

প্রত্যাবর্তন

Integer - এই ব্যাপ্তিতে সারি সংখ্যা।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Number Format()

প্রদত্ত রেঞ্জের শীর্ষ-বাম সেলটির নম্বর বা তারিখের বিন্যাস পান। প্রত্যাবর্তিত ফর্ম্যাট নিদর্শনগুলি শীট এপিআই ডকুমেন্টেশনে বর্ণিত হয়েছে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('C4');
Logger.log(cell.getNumberFormat());

প্রত্যাবর্তন

String -পরিসরের শীর্ষ-বাম কোষের সংখ্যা ফর্ম্যাট।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Number Formats()

পরিসরের কোষগুলির জন্য নম্বর বা তারিখের ফর্ম্যাটগুলি প্রদান করে। প্রত্যাবর্তিত ফর্ম্যাট নিদর্শনগুলি শীট এপিআই ডকুমেন্টেশনে বর্ণিত হয়েছে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B5:C6');
const formats = range.getNumberFormats();
for (const i in formats) {
  for (const j in formats[i]) {
    Logger.log(formats[i][j]);
  }
}

প্রত্যাবর্তন

String[][] -সংখ্যা ফর্ম্যাটগুলির একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Rich Text Value()

পরিসরের উপরের বাম কক্ষের জন্য সমৃদ্ধ পাঠ্য মানটি প্রদান করে বা কোষের মান পাঠ্য না হলে null

// Gets the Rich Text value of cell D4.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('D4:F6');
const richText = range.getRichTextValue();
console.log(richText.getText());

প্রত্যাবর্তন

Rich Text Value - শীর্ষে বাম কক্ষের সমৃদ্ধ পাঠ্য মানটি পরিসীমা বা null যদি কোষের মান পাঠ্য না হয়।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Rich Text Values()

পরিসরের কোষগুলির জন্য সমৃদ্ধ পাঠ্য মানগুলি প্রদান করে।

// Gets the Rich Text values for all cells in range B5:C6
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('B5:C6');
const values = range.getRichTextValues();

for (let i = 0; i < values.length; i++) {
  for (let j = 0; j < values[i].length; j++) {
    console.log(values[i][j].getText());
  }
}

প্রত্যাবর্তন

Rich Text Value[][] -সমৃদ্ধ পাঠ্য মানগুলির একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Row()

এই পরিসীমা জন্য সারি অবস্থান প্রদান করে। সারি সূচক () পেতে অভিন্ন।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B2');
Logger.log(range.getRow());

প্রত্যাবর্তন

Integer - পরিসরের সারি অবস্থান।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Row Index()

এই পরিসীমা জন্য সারি অবস্থান প্রদান করে। সারি () পেতে অভিন্ন।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B2');
Logger.log(range.getRowIndex());

প্রত্যাবর্তন

Integer - পরিসরের সারি অবস্থান।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

এছাড়াও দেখুন


get Sheet()

এই পরিসীমাটি অন্তর্ভুক্ত শীটটি ফেরত দেয়।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:D10 on Sheet1.
const range = sheet.getRange('A1:D10');

// Gets the sheet that the range belongs to.
const rangeSheet = range.getSheet();

// Gets the sheet name and logs it to the console.
console.log(rangeSheet.getName());

প্রত্যাবর্তন

Sheet - এই পরিসীমাটি যে শীটটি সম্পর্কিত।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Text Direction()

পরিসরের শীর্ষ বাম ঘরের জন্য পাঠ্যের দিকটি ফেরত দেয়। যদি সেল পাঠ্যের দিকটি স্বয়ংক্রিয় সনাক্তকরণের সাথে নির্ধারিত হয় তবে null ফেরত দেয়।

// Get the text direction of cell B1.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('B1:D4');
Logger.log(range.getTextDirection());

প্রত্যাবর্তন

Text Direction - পরিসীমা শীর্ষে বাম ঘরের পাঠ্য দিক।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Text Directions()

পরিসরের কোষগুলির জন্য পাঠ্য দিকনির্দেশগুলি প্রদান করে। 2 ডি অ্যারেতে এন্ট্রিগুলি স্বয়ংক্রিয় সনাক্তকরণ ব্যবহার করে কোষগুলির জন্য null

// Get the text directions for all cells in range B5:C6
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('B5:C6');
const directions = range.getTextDirections();

for (let i = 0; i < directions.length; i++) {
  for (let j = 0; j < directions[i].length; j++) {
    Logger.log(directions[i][j]);
  }
}

প্রত্যাবর্তন

Text Direction[][] -পাঠ্য দিকনির্দেশগুলির একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Text Rotation()

পরিসরের উপরের বাম কক্ষের জন্য পাঠ্য ঘূর্ণন সেটিংস প্রদান করে।

// Log the text rotation settings for a cell.
const sheet = SpreadsheetApp.getActiveSheet();

const cell = sheet.getRange('A1');
Logger.log(cell.getTextRotation());

প্রত্যাবর্তন

Text Rotation - পাঠ্য ঘূর্ণন সেটিংস।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Text Rotations()

পরিসরের কোষগুলির জন্য পাঠ্য ঘূর্ণন সেটিংস প্রদান করে।

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('B2:D4');

const results = range.getTextRotations();

for (const i in results) {
  for (const j in results[i]) {
    const rotation = results[i][j];
    Logger.log('Cell [%s, %s] has text rotation: %v', i, j, rotation);
  }
}

প্রত্যাবর্তন

Text Rotation[][] -পরিসরের কোষগুলির সাথে সম্পর্কিত পাঠ্য ঘূর্ণনের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Text Style()

পরিসরের শীর্ষ বাম কক্ষের জন্য পাঠ্য শৈলীটি ফেরত দেয়।

// Get the text style of cell D4.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('D4:F6');
const style = range.getTextStyle();
Logger.log(style);

প্রত্যাবর্তন

Text Style - পরিসীমা শীর্ষে বাম ঘরের পাঠ্য শৈলী।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Text Styles()

পরিসরের কোষগুলির জন্য পাঠ্য শৈলীগুলি ফেরত দেয়।

// Get the text styles for all cells in range B5:C6
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('B5:C6');
const styles = range.getTextStyles();

for (let i = 0; i < styles.length; i++) {
  for (let j = 0; j < styles[i].length; j++) {
    Logger.log(styles[i][j]);
  }
}

প্রত্যাবর্তন

Text Style[][] -পাঠ্য শৈলীর একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Value()

পরিসীমা শীর্ষ-বাম কোষের মান প্রদান করে। মানটি কোষের মানের উপর নির্ভর করে টাইপ Number , Boolean , Date বা String হতে পারে। খালি কোষগুলি একটি খালি স্ট্রিং ফিরিয়ে দেয়।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:D10 on Sheet1.
const range = sheet.getRange('A1:D10');

// Gets the value of the top-left cell in the range and logs it to the console.
console.log(range.getValue());

প্রত্যাবর্তন

Object - এই কোষে মান।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Values()

এই ব্যাপ্তির জন্য মানগুলির আয়তক্ষেত্রাকার গ্রিডটি প্রদান করে।

সারি দ্বারা সারি, তারপরে কলাম দ্বারা সূচকযুক্ত মানগুলির একটি দ্বি-মাত্রিক অ্যারে প্রদান করে। মানগুলি কোষের মানের উপর নির্ভর করে টাইপ Number , Boolean , Date বা String হতে পারে। খালি কোষগুলি অ্যারেতে একটি খালি স্ট্রিং দ্বারা প্রতিনিধিত্ব করা হয়। মনে রাখবেন যে একটি পরিসীমা সূচক 1, 1 এ শুরু হওয়ার সময়, জাভাস্ক্রিপ্ট অ্যারে [0][0] থেকে সূচী করা হয়।

// The code below gets the values for the range C2:G8
// in the active spreadsheet.  Note that this is a JavaScript array.
const values = SpreadsheetApp.getActiveSheet().getRange(2, 3, 6, 4).getValues();
Logger.log(values[0][0]);
ওয়েব অ্যাপ্লিকেশনগুলিতে, একটি Date মান কোনও আইনী প্যারামিটার নয়। get Values() যদি কোনও Date মান সহ একটি সেল থাকে তবে কোনও ওয়েব অ্যাপ্লিকেশনটিতে ডেটা ফেরত দিতে ব্যর্থ হয়। পরিবর্তে, শীট থেকে প্রাপ্ত সমস্ত মানগুলি একটি Number , Boolean বা String মতো সমর্থিত জাভাস্ক্রিপ্ট আদিমে রূপান্তর করুন।

প্রত্যাবর্তন

Object[][] -মানগুলির একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Vertical Alignment()

পরিসরের শীর্ষ-বাম কোণে ঘরের উল্লম্ব প্রান্তিককরণ (শীর্ষ/মাঝারি/নীচে) প্রদান করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

Logger.log(range.getVerticalAlignment());

প্রত্যাবর্তন

String - কোষে পাঠ্যের উল্লম্ব প্রান্তিককরণ।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Vertical Alignments()

পরিসরে কোষগুলির উল্লম্ব প্রান্তিককরণগুলি ফেরত দেয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

const results = range.getVerticalAlignments();

for (const i in results) {
  for (const j in results[i]) {
    Logger.log(results[i][j]);
  }
}

প্রত্যাবর্তন

String[][] -পরিসরের কোষগুলির সাথে সম্পর্কিত পাঠ্যের উল্লম্ব প্রান্তিককরণের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Width()

কলামগুলিতে পরিসীমাটির প্রস্থটি ফেরত দেয়।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:D10 on Sheet1.
const range = sheet.getRange('A1:D10');

// Gets the width of the range in number of columns and logs it to the console.
console.log(range.getWidth());

প্রত্যাবর্তন

Integer - পরিসীমা মধ্যে কলাম সংখ্যা।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Wrap()

ঘরের পাঠ্যটি মোড়ানো কিনা তা ফিরিয়ে দেয়। আরও দানাদার মোড়ানো কৌশল পেতে, get Wrap Strategy() ব্যবহার করুন।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

Logger.log(range.getWrap());

প্রত্যাবর্তন

Boolean - এই কোষের পাঠ্যটি গুটিয়ে যায় বা না হোক।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Wrap Strategies()

পরিসরের কোষগুলির জন্য পাঠ্য মোড়ানো কৌশলগুলি ফেরত দেয়।

// Get the text wrapping strategies for all cells in range B5:C6
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('B5:C6');
const strategies = range.getWrapStrategies();

for (let i = 0; i < strategies.length; i++) {
  for (let j = 0; j < strategies[i].length; j++) {
    Logger.log(strategies[i][j]);
  }
}

প্রত্যাবর্তন

Wrap Strategy[][] -পাঠ্য মোড়ানোর কৌশলগুলির একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Wrap Strategy()

পরিসরের শীর্ষ বাম কক্ষের জন্য পাঠ্য মোড়ানো কৌশলটি ফেরত দেয়।

// Get the text wrapping strategy of cell B1.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('B1:D4');
Logger.log(range.getWrapStrategy());

প্রত্যাবর্তন

Wrap Strategy - পরিসীমা শীর্ষে বাম কক্ষের পাঠ্য মোড়ানো কৌশল।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

get Wraps()

কোষগুলির পাঠ্য মোড়ানো কিনা তা ফেরত দেয়। আরও দানাদার মোড়ানো কৌশল পেতে, get Wrap Strategies() ব্যবহার করুন।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

const results = range.getVerticalAlignments();

for (const i in results) {
  for (const j in results[i]) {
    const isWrapped = results[i][j];
    if (isWrapped) {
      Logger.log('Cell [%s, %s] has wrapped text', i, j);
    }
  }
}

প্রত্যাবর্তন

Boolean[][] -পরিসরের কোষগুলির সাথে সম্পর্কিত পাঠ্যের উল্লম্ব প্রান্তিককরণের একটি দ্বি-মাত্রিক অ্যারে।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

insert Cells(shiftDimension)

এই পরিসীমা খালি সেলগুলি সন্নিবেশ করান। নতুন কোষগুলি পূর্বে এই পরিসীমাটি দখল করে এমন কোষগুলিতে উপস্থিত কোনও ফর্ম্যাটিং ধরে রাখে। প্রদত্ত মাত্রা বরাবর শীটে বিদ্যমান ডেটা সন্নিবেশিত পরিসীমা থেকে দূরে স্থানান্তরিত হয়।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('A1:D10');
range.insertCells(SpreadsheetApp.Dimension.COLUMNS);

পরামিতি

নাম টাইপ বর্ণনা
shift Dimension Dimension বিদ্যমান ডেটা স্থানান্তর করতে যে মাত্রা বরাবর।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

insert Checkboxes()

রেঞ্জের প্রতিটি কক্ষে চেকবক্সগুলি সন্নিবেশ করান, যাচাইয়ের জন্য true সাথে কনফিগার করা এবং চেক করা জন্য false । পরিসরের সমস্ত কোষের মানকে false বলে সেট করে।

const range = SpreadsheetApp.getActive().getRange('A1:B10');

// Inserts checkboxes into each cell in the range A1:B10 configured with 'true'
// for checked and 'false' for unchecked. Also, sets the value of each cell in
// the range A1:B10 to 'false'.
range.insertCheckboxes();

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

insert Checkboxes(checkedValue)

রেঞ্জের প্রতিটি কক্ষে চেকবক্সগুলি সন্নিবেশ করানো, চেকের জন্য একটি কাস্টম মান এবং চেক করার জন্য খালি স্ট্রিং সহ কনফিগার করা। খালি স্ট্রিংয়ে প্রতিটি ঘরের মান নির্ধারণ করে।

const range = SpreadsheetApp.getActive().getRange('A1:B10');

// Inserts checkboxes into each cell in the range A1:B10 configured with 'yes'
// for checked and the empty string for unchecked. Also, sets the value of each
// cell in the range A1:B10 to
//  the empty string.
range.insertCheckboxes('yes');

পরামিতি

নাম টাইপ বর্ণনা
checked Value Object চেকবক্স ডেটা বৈধতার জন্য চেক করা মান।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

insert Checkboxes(checkedValue, uncheckedValue)

চেক করা এবং চেক করা রাষ্ট্রগুলির জন্য কাস্টম মানগুলির সাথে কনফিগার করা পরিসীমা প্রতিটি কক্ষে চেকবক্সগুলি সন্নিবেশ করানো। প্রতিটি কক্ষের মানটি কাস্টম আনচেকড মানতে পরিসীমাটিতে সেট করে।

const range = SpreadsheetApp.getActive().getRange('A1:B10');

// Inserts checkboxes into each cell in the range A1:B10 configured with 'yes'
// for checked and 'no' for unchecked. Also, sets the value of each cell in the
// range A1:B10 to 'no'.
range.insertCheckboxes('yes', 'no');

পরামিতি

নাম টাইপ বর্ণনা
checked Value Object চেকবক্স ডেটা বৈধতার জন্য চেক করা মান।
unchecked Value Object চেকবক্স ডেটা বৈধতার জন্য চেক করা মান।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

is Blank()

পরিসীমা সম্পূর্ণ ফাঁকা থাকলে true প্রত্যাবর্তন করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B2:D4');

Logger.log(range.isBlank());

প্রত্যাবর্তন

Boolean - true যদি পরিসীমা ফাঁকা হয়; অন্যথায় false

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

is Checked()

রেঞ্জের সমস্ত কক্ষের তাদের চেকবক্সের অবস্থা 'চেক' হিসাবে রয়েছে কিনা তা ফিরিয়ে দেয়। কিছু কোষ চেক করা হয় এবং বাকীগুলি চেক না করা হয়, বা যদি কিছু কোষের চেকবক্স ডেটা বৈধতা না থাকে তবে null করে দেয়।

const range = SpreadsheetApp.getActive().getRange('A1:A3');

// Inserts checkboxes and sets each cell value to 'no' in the range A1:A3.
range.insertCheckboxes('yes', 'no');

const range1 = SpreadsheetApp.getActive().getRange('A1');
range1.setValue('yes');
// Sets the value of isRange1Checked as true as it contains the checked value.
const isRange1Checked = range1.isChecked();

const range2 = SpreadsheetApp.getActive().getRange('A2');
range2.setValue('no');
// Sets the value of isRange2Checked as false as it contains the unchecked
// value.
const isRange2Checked = range2.isChecked();

const range3 = SpreadsheetApp.getActive().getRange('A3');
range3.setValue('random');
// Sets the value of isRange3Checked as null, as it contains an invalid checkbox
// value.
const isRange3Checked = range3.isChecked();

প্রত্যাবর্তন

Boolean - true , যদি রেঞ্জের সমস্ত কোষ পরীক্ষা করা হয়, তবে যদি রেঞ্জের সমস্ত কক্ষগুলি চেক না করা হয় তবে false , বা কোনও কোষ যদি চেক করা না হয় বা চেকবক্স ডেটা বৈধতা না থাকে তবে null

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

is End Column Bounded()

পরিসীমাটির শেষটি কোনও নির্দিষ্ট কলামের সাথে আবদ্ধ কিনা তা নির্ধারণ করে। উদাহরণস্বরূপ, রেঞ্জস A1:B10 বা B:B , যা পরিসীমা শেষে কলামগুলির সাথে আবদ্ধ, এই পদ্ধতিটি true ফিরে আসে; রেঞ্জ 3:7 বা A1:5 এর জন্য, যা কেবলমাত্র পরিসীমা শেষে নির্দিষ্ট সারিগুলিতে আবদ্ধ, এই পদ্ধতিটি false ফেরত দেয়।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:D10 on Sheet1.
const range = sheet.getRange('A1:D10');

// Determines if the end of the range is bound to a particular column and logs
// it to the console.
console.log(range.isEndColumnBounded());

প্রত্যাবর্তন

Boolean - true যদি পরিসরের শেষটি কোনও নির্দিষ্ট কলামের সাথে আবদ্ধ থাকে; অন্যথায় false

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

is End Row Bounded()

পরিসীমাটির শেষটি একটি নির্দিষ্ট সারিতে আবদ্ধ কিনা তা নির্ধারণ করে। উদাহরণস্বরূপ, A1:B10 বা 3:7 রেঞ্জের জন্য, যা পরিসীমা শেষে সারিগুলিতে আবদ্ধ, এই পদ্ধতিটি true ফিরে আসে; B:B বা A1:C রেঞ্জের জন্য, যা কেবলমাত্র পরিসরের শেষে নির্দিষ্ট কলামগুলির সাথে আবদ্ধ, এই পদ্ধতিটি false ফেরত দেয়।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:D10 on Sheet1.
const range = sheet.getRange('A1:D10');

// Determines if the end of the range is bound to a particular row and logs it
// to the console.
console.log(range.isEndRowBounded());

প্রত্যাবর্তন

Boolean - true যদি পরিসরের শেষটি একটি নির্দিষ্ট সারিতে আবদ্ধ থাকে; অন্যথায় false

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

is Part Of Merge()

যদি বর্তমান পরিসরের কোষগুলি কোনও মার্জড কোষকে ওভারল্যাপ করে তবে true প্রত্যাবর্তন করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('A1:B3');

// True if any of the cells in A1:B3 is included in a merge.
const isPartOfMerge = range.isPartOfMerge();

প্রত্যাবর্তন

Boolean - true যদি পরিসীমাটি কোনও মার্জ করা কোষকে ওভারল্যাপ করে, অন্যথায় false ফেরত দেয়।


is Start Column Bounded()

পরিসরের শুরুটি কোনও নির্দিষ্ট কলামের সাথে আবদ্ধ কিনা তা নির্ধারণ করে। উদাহরণস্বরূপ, A1:B10 বা B:B রেঞ্জের জন্য, যা পরিসীমা শুরুতে কলামগুলির সাথে আবদ্ধ, এই পদ্ধতিটি true ফিরে আসে; পরিসরের শুরুতে কেবল এক সারিতে আবদ্ধ 3:7 এর জন্য, এই পদ্ধতিটি false ফেরত দেয়।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:D10 on Sheet1.
const range = sheet.getRange('A1:D10');

// Determines if the start of the range is bound to a particular column and logs
// it to the console.
console.log(range.isStartColumnBounded());

প্রত্যাবর্তন

Boolean - true যদি রেঞ্জের শুরুটি একটি নির্দিষ্ট কলামে আবদ্ধ থাকে; অন্যথায় false

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

is Start Row Bounded()

পরিসীমা শুরুটি একটি নির্দিষ্ট সারিতে আবদ্ধ কিনা তা নির্ধারণ করে। উদাহরণস্বরূপ, A1:B10 বা 3:7 রেঞ্জের জন্য, যা পরিসরের শুরুতে সারিগুলিতে আবদ্ধ থাকে, এই পদ্ধতিটি true ফিরে আসে; B:B রেঞ্জের জন্য, যা কেবলমাত্র পরিসরের শুরুতে একটি নির্দিষ্ট কলামের সাথে আবদ্ধ, এই পদ্ধতিটি false ফেরত দেয়।

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can use SpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets the range A1:D10 on Sheet1.
const range = sheet.getRange('A1:D10');

// Determines if the start of the range is bound to a particular row and logs it
// to the console.
console.log(range.isStartRowBounded());

প্রত্যাবর্তন

Boolean - true যদি রেঞ্জের শুরুটি একটি নির্দিষ্ট সারিতে আবদ্ধ থাকে; অন্যথায় false

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

merge()

পরিসরের কোষগুলিকে একক ব্লকে একত্রিত করে।

const sheet = SpreadsheetApp.getActiveSheet();

// The code below 2-dimensionally merges the cells in A1 to B3
sheet.getRange('A1:B3').merge();

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

merge Across()

পরিসরের কলামগুলি জুড়ে কোষগুলিকে একীভূত করুন।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// The code below merges cells C5:E5 into one cell
const range1 = sheet.getRange('C5:E5');
range1.mergeAcross();

// The code below creates 2 horizontal cells, F5:H5 and F6:H6
const range2 = sheet.getRange('F5:H6');
range2.mergeAcross();

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

merge Vertically()

সীমাতে কোষগুলিকে একত্রিত করে।

const sheet = SpreadsheetApp.getActiveSheet();

// The code below vertically merges the cells in A1 to A10
sheet.getRange('A1:A10').mergeVertically();

// The code below creates 3 merged columns: B1 to B10, C1 to C10, and D1 to D10
sheet.getRange('B1:D10').mergeVertically();

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

move To(target)

এই পরিসীমা থেকে লক্ষ্য পরিসীমা পর্যন্ত কাটা এবং পেস্ট করুন (উভয় ফর্ম্যাট এবং মান)।

// The code below moves the first 5 columns over to the 6th column
const sheet = SpreadsheetApp.getActiveSheet();
sheet.getRange('A1:E').moveTo(sheet.getRange('F1'));

পরামিতি

নাম টাইপ বর্ণনা
target Range এই পরিসীমাটি অনুলিপি করার জন্য একটি লক্ষ্য পরিসীমা; শুধুমাত্র শীর্ষ-বাম কোষের অবস্থান প্রাসঙ্গিক।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

offset(rowOffset, columnOffset)

প্রদত্ত সারি এবং কলামগুলির (যা নেতিবাচক হতে পারে) দ্বারা এই পরিসীমা থেকে অফসেট করা একটি নতুন পরিসীমা প্রদান করে। নতুন পরিসীমা মূল পরিসীমা হিসাবে একই আকার।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('A1');

// newCell references B2
const newCell = cell.offset(1, 1);

পরামিতি

নাম টাইপ বর্ণনা
row Offset Integer পরিসরের শীর্ষ-বাম সেল থেকে সারি সংখ্যা; নেতিবাচক মানগুলি রেঞ্জের শীর্ষ-বাম সেল থেকে সারিগুলি উপস্থাপন করে।
column Offset Integer রেঞ্জের শীর্ষ-বাম সেল থেকে কলামগুলির সংখ্যা; নেতিবাচক মানগুলি রেঞ্জের শীর্ষ-বাম সেল থেকে বাম কলামগুলি উপস্থাপন করে।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।


offset(rowOffset, columnOffset, numRows)

একটি নতুন পরিসীমা ফেরত দেয় যা বর্তমান পরিসরের সাথে সম্পর্কিত, যার উপরের বাম পয়েন্টটি প্রদত্ত সারি এবং কলামগুলি দ্বারা বর্তমান পরিসীমা থেকে অফসেট এবং কোষগুলিতে প্রদত্ত উচ্চতা সহ।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('A1');

// newCell references B2:B3
const newRange = cell.offset(1, 1, 2);

পরামিতি

নাম টাইপ বর্ণনা
row Offset Integer পরিসরের শীর্ষ-বাম সেল থেকে সারি সংখ্যা; নেতিবাচক মানগুলি রেঞ্জের শীর্ষ-বাম সেল থেকে সারিগুলি উপস্থাপন করে।
column Offset Integer রেঞ্জের শীর্ষ-বাম সেল থেকে কলামগুলির সংখ্যা; নেতিবাচক মানগুলি রেঞ্জের শীর্ষ-বাম সেল থেকে বাম কলামগুলি উপস্থাপন করে।
num Rows Integer নতুন পরিসরের সারি সারি উচ্চতা।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।


offset(rowOffset, columnOffset, numRows, numColumns)

একটি নতুন পরিসীমা ফেরত দেয় যা বর্তমান পরিসরের সাথে সম্পর্কিত, যার উপরের বাম পয়েন্টটি প্রদত্ত সারি এবং কলামগুলি দ্বারা বর্তমান পরিসীমা থেকে অফসেট করা হয় এবং কোষগুলিতে প্রদত্ত উচ্চতা এবং প্রস্থ সহ।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('A1');

// newCell references B2:C3
const newRange = cell.offset(1, 1, 2, 2);

পরামিতি

নাম টাইপ বর্ণনা
row Offset Integer পরিসরের শীর্ষ-বাম সেল থেকে সারি সংখ্যা; নেতিবাচক মানগুলি রেঞ্জের শীর্ষ-বাম সেল থেকে সারিগুলি উপস্থাপন করে।
column Offset Integer রেঞ্জের শীর্ষ-বাম সেল থেকে কলামগুলির সংখ্যা; নেতিবাচক মানগুলি রেঞ্জের শীর্ষ-বাম সেল থেকে বাম কলামগুলি উপস্থাপন করে।
num Rows Integer নতুন পরিসরের সারি সারি উচ্চতা।
num Columns Integer নতুন পরিসরের কলামে প্রস্থ।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।


protect()

অনুমতি থাকা ব্যবহারকারীদের ব্যতীত এমন একটি বস্তু তৈরি করে যা পরিসীমা সম্পাদনা করা থেকে রক্ষা করতে পারে। যতক্ষণ না স্ক্রিপ্টটি প্রকৃতপক্ষে পরিসীমাটির জন্য সম্পাদকদের তালিকা পরিবর্তন করে ( Protection.removeEditor(emailAddress) , Protection.removeEditor(user) , Protection.removeEditors(emailAddresses) , Protection.addEditor(emailAddress) , Protection.addEditor(user) , Protection.addEditors(emailAddresses) , বা Protection.setDomainEdit(editable) ), অনুমতিগুলি স্প্রেডশিটের নিজেই মিররকে আয়না দেয়, যার কার্যকরভাবে বোঝায় যে পরিসীমাটি অরক্ষিত রয়েছে। যদি পরিসীমাটি ইতিমধ্যে সুরক্ষিত থাকে তবে এই পদ্ধতিটি একটি নতুন সুরক্ষিত পরিসীমা তৈরি করে যা বিদ্যমানটিকে ওভারল্যাপ করে। যদি কোনও সেল একাধিক সুরক্ষিত রেঞ্জ দ্বারা সুরক্ষিত থাকে এবং এর মধ্যে কোনও নির্দিষ্ট ব্যবহারকারীকে কোষ সম্পাদনা করতে বাধা দেয়, তবে সেই ব্যবহারকারীকে সেলটি সম্পাদনা করার অনুমতি দেওয়া হয় না।

// Protect range A1:B10, then remove all other users from the list of editors.
const ss = SpreadsheetApp.getActive();
const range = ss.getRange('A1:B10');
const protection = range.protect().setDescription('Sample protected range');

// Ensure the current user is an editor before removing others. Otherwise, if
// the user's edit permission comes from a group, the script throws an exception
// upon removing the group.
const me = Session.getEffectiveUser();
protection.addEditor(me);
protection.removeEditors(protection.getEditors());
if (protection.canDomainEdit()) {
  protection.setDomainEdit(false);
}

প্রত্যাবর্তন

Protection - সুরক্ষা সেটিংসের প্রতিনিধিত্বকারী একটি বস্তু।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

randomize()

প্রদত্ত পরিসরে সারিগুলির ক্রমটি এলোমেলো করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('A1:C7');

// Randomizes the range
range.randomize();

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

remove Checkboxes()

পরিসীমা থেকে সমস্ত চেকবক্সগুলি সরিয়ে দেয়। প্রতিটি ঘরের ডেটা বৈধতা সাফ করে এবং যদি সেলটিতে চেক করা বা চেক করা মান থাকে তবে অতিরিক্তভাবে এর মান সাফ করে।

const range = SpreadsheetApp.getActive().getRange('A1:B10');

// Inserts checkboxes and sets each cell value to 'no' in the range A1:B10.
range.insertCheckboxes('yes', 'no');

const range1 = SpreadsheetApp.getActive().getRange('A1');
range1.setValue('yes');
// Removes the checkbox data validation in cell A1 and clears its value.
range1.removeCheckboxes();

const range2 = SpreadsheetApp.getActive().getRange('A2');
range2.setValue('random');
// Removes the checkbox data validation in cell A2 but does not clear its value.
range2.removeCheckboxes();

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

remove Duplicates()

এই সীমার মধ্যে সারিগুলি সরিয়ে দেয় যা এমন মানগুলি ধারণ করে যা কোনও পূর্ববর্তী সারিতে মানগুলির সদৃশ। অভিন্ন মান সহ সারিগুলি তবে বিভিন্ন অক্ষরের কেস, ফর্ম্যাটিং বা সূত্রগুলি সদৃশ হিসাবে বিবেচিত হয়। এই পদ্ধতিটি ভিউ থেকে লুকানো সারিগুলি নকল করেও সরিয়ে দেয় (উদাহরণস্বরূপ, একটি ফিল্টারের কারণে)। এই ব্যাপ্তির বাইরে সামগ্রী সরানো হয়নি।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B1:D7');

// Remove duplicate rows in the range.
range.removeDuplicates();

প্রত্যাবর্তন

Range - সদৃশ অপসারণের পরে ফলাফলের পরিসীমা। প্রতিটি সারি অপসারণের জন্য পরিসীমাটির আকার এক সারিতে হ্রাস করা হয়।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

remove Duplicates(columnsToCompare)

এই সীমার মধ্যে সারিগুলি সরিয়ে দেয় যা নির্দিষ্ট কলামগুলিতে মানগুলি ধারণ করে যা কোনও পূর্ববর্তী সারি মানগুলির সদৃশ। অভিন্ন মান সহ সারিগুলি তবে বিভিন্ন অক্ষরের কেস, ফর্ম্যাটিং বা সূত্রগুলি সদৃশ হিসাবে বিবেচিত হয়। এই পদ্ধতিটি ভিউ থেকে লুকানো সারিগুলি নকল করেও সরিয়ে দেয় (উদাহরণস্বরূপ, একটি ফিল্টারের কারণে)। এই ব্যাপ্তির বাইরে সামগ্রী সরানো হয়নি।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('B1:D7');

// Remove rows which have duplicate values in column B.
range.removeDuplicates([2]);

// Remove rows which have duplicate values in both columns B and D.
range.removeDuplicates([2, 4]);

পরামিতি

নাম টাইপ বর্ণনা
columns To Compare Integer[] নকল মানগুলির জন্য বিশ্লেষণ করার জন্য কলামগুলি। যদি কোনও কলাম সরবরাহ না করা হয় তবে সমস্ত কলাম নকলগুলির জন্য বিশ্লেষণ করা হয়।

প্রত্যাবর্তন

Range - সদৃশ অপসারণের পরে ফলাফলের পরিসীমা। প্রতিটি সারি অপসারণের জন্য পরিসীমাটির আকার এক সারিতে হ্রাস করা হয়।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Background(color)

সিএসএস স্বরলিপি (যেমন '#ffffff' বা 'white' ) এর পরিসরে সমস্ত কোষের পটভূমি রঙ সেট করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const range = sheet.getRange('B2:D5');
range.setBackground('red');

পরামিতি

নাম টাইপ বর্ণনা
color String সিএসএস নোটেশনে একটি রঙিন কোড (যেমন '#ffffff' বা 'white' ); একটি null মান রঙ পুনরায় সেট করে।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Background Object(color)

পরিসীমা সমস্ত কোষের পটভূমি রঙ সেট করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const bgColor = SpreadsheetApp.newColor()
                    .setThemeColor(SpreadsheetApp.ThemeColorType.BACKGROUND)
                    .build();

const range = sheet.getRange('B2:D5');
range.setBackgroundObject(bgColor);

পরামিতি

নাম টাইপ বর্ণনা
color Color পটভূমির রঙ সেট করতে; null মান পটভূমির রঙ পুনরায় সেট করে।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Background Objects(color)

ব্যাকগ্রাউন্ড রঙের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (অবশ্যই এই পরিসরের মাত্রাগুলির সাথে মেলে)।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const colorAccent1 = SpreadsheetApp.newColor()
                         .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT1)
                         .build();
const colorAccent2 = SpreadsheetApp.newColor()
                         .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT2)
                         .build();
const colorAccent3 = SpreadsheetApp.newColor()
                         .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT3)
                         .build();
const colorAccent4 = SpreadsheetApp.newColor()
                         .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT4)
                         .build();

const colors = [
  [colorAccent1, colorAccent2],
  [colorAccent3, colorAccent4],
];

const cell = sheet.getRange('B5:C6');
cell.setBackgroundObjects(colors);

পরামিতি

নাম টাইপ বর্ণনা
color Color[][] রঙের একটি দ্বি-মাত্রিক অ্যারে; null মানগুলি রঙ পুনরায় সেট করে।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Background RGB(red, green, blue)

আরজিবি মানগুলি (0 এবং 255 অন্তর্ভুক্তির মধ্যে পূর্ণসংখ্যা) ব্যবহার করে প্রদত্ত রঙে ব্যাকগ্রাউন্ড সেট করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');

// Sets the background to white
cell.setBackgroundRGB(255, 255, 255);

// Sets the background to red
cell.setBackgroundRGB(255, 0, 0);

পরামিতি

নাম টাইপ বর্ণনা
red Integer আরজিবি স্বরলিপিতে লাল মান।
green Integer আরজিবি স্বরলিপি সবুজ মান।
blue Integer আরজিবি স্বরলিপিতে নীল মান।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Backgrounds(color)

ব্যাকগ্রাউন্ড রঙের একটি আয়তক্ষেত্রাকার গ্রিড সেট করে (অবশ্যই এই পরিসরের মাত্রাগুলির সাথে মেলে)। রঙগুলি সিএসএস নোটেশনে রয়েছে (যেমন '#ffffff' বা 'white' )।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const colors = [
  ['red', 'white', 'blue'],
  ['#FF0000', '#FFFFFF', '#0000FF'],  // These are the hex equivalents
];

const cell = sheet.getRange('B5:D6');
cell.setBackgrounds(colors);

পরামিতি

নাম টাইপ বর্ণনা
color String[][] সিএসএস স্বরলিপিতে রঙের একটি দ্বি-মাত্রিক অ্যারে (যেমন '#ffffff' বা 'white' ); null মানগুলি রঙ পুনরায় সেট করে।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Border(top, left, bottom, right, vertical, horizontal)

সীমানা সম্পত্তি সেট করে। বৈধ মানগুলি true (চালু), false (অফ) এবং null (কোনও পরিবর্তন নেই)।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
// Sets borders on the top and bottom, but leaves the left and right unchanged
cell.setBorder(true, null, true, null, false, false);

পরামিতি

নাম টাইপ বর্ণনা
top Boolean সীমান্তের জন্য true , কারও পক্ষে false , কোনও পরিবর্তন null
left Boolean সীমান্তের জন্য true , কারও পক্ষে false , কোনও পরিবর্তন null
bottom Boolean সীমান্তের জন্য true , কারও পক্ষে false , কোনও পরিবর্তন null
right Boolean সীমান্তের জন্য true , কারও পক্ষে false , কোনও পরিবর্তন null
vertical Boolean অভ্যন্তরীণ উল্লম্ব সীমানার জন্য true , কারও পক্ষে false , কোনও পরিবর্তন null
horizontal Boolean অভ্যন্তরীণ অনুভূমিক সীমানার জন্য true , কারও পক্ষে false , কোনও পরিবর্তন null

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Border(top, left, bottom, right, vertical, horizontal, color, style)

রঙ এবং/অথবা শৈলীর সাথে সীমানা সম্পত্তি সেট করে। বৈধ মানগুলি true (চালু), false (অফ) এবং null (কোনও পরিবর্তন নেই)। রঙের জন্য, সিএসএস স্বরলিপিতে রঙ ব্যবহার করুন (যেমন '#ffffff' বা 'white' )।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
// Sets borders on the top and bottom, but leaves the left and right unchanged
// Also sets the color to "red", and the border to "DASHED".
cell.setBorder(
    true,
    null,
    true,
    null,
    false,
    false,
    'red',
    SpreadsheetApp.BorderStyle.DASHED,
);

পরামিতি

নাম টাইপ বর্ণনা
top Boolean সীমান্তের জন্য true , কারও পক্ষে false , কোনও পরিবর্তন null
left Boolean সীমান্তের জন্য true , কারও পক্ষে false , কোনও পরিবর্তন null
bottom Boolean সীমান্তের জন্য true , কারও পক্ষে false , কোনও পরিবর্তন null
right Boolean সীমান্তের জন্য true , কারও পক্ষে false , কোনও পরিবর্তন null
vertical Boolean অভ্যন্তরীণ উল্লম্ব সীমানার জন্য true , কারও পক্ষে false , কোনও পরিবর্তন null
horizontal Boolean অভ্যন্তরীণ অনুভূমিক সীমানার জন্য true , কারও পক্ষে false , কোনও পরিবর্তন null
color String সিএসএস স্বরলিপি (যেমন '#ffffff' বা 'white' ) এর একটি রঙ, ডিফল্ট রঙের জন্য null (কালো)।
style Border Style সীমানাগুলির জন্য একটি স্টাইল, ডিফল্ট শৈলীর জন্য null (কঠিন)।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Data Validation(rule)

পরিসরের সমস্ত কোষের জন্য একটি ডেটা বৈধতা নিয়ম সেট করে।

// Set the data validation rule for cell A1 to require a value from B1:B10.
const cell = SpreadsheetApp.getActive().getRange('A1');
const range = SpreadsheetApp.getActive().getRange('B1:B10');
const rule =
    SpreadsheetApp.newDataValidation().requireValueInRange(range).build();
cell.setDataValidation(rule);

পরামিতি

নাম টাইপ বর্ণনা
rule Data Validation সেট করতে ডেটা বৈধতা নিয়ম, বা ডেটা বৈধতা অপসারণ করতে null

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Data Validations(rules)

পরিসরের সমস্ত কোষের জন্য ডেটা বৈধতা বিধি সেট করে। এই পদ্ধতিটি ডেটা বৈধতার একটি দ্বি-মাত্রিক অ্যারে নেয়, যার পরে সারি অনুসারে কলাম দ্বারা সূচিযুক্ত। অ্যারের মাত্রাগুলি অবশ্যই পরিসীমা মাত্রার সাথে সামঞ্জস্য করতে হবে।

// Set the data validation rules for Sheet1!A1:B5 to require a value from
// Sheet2!A1:A10.
const destinationRange =
    SpreadsheetApp.getActive().getSheetByName('Sheet1').getRange('A1:B5');
const sourceRange =
    SpreadsheetApp.getActive().getSheetByName('Sheet2').getRange('A1:A10');
const rule =
    SpreadsheetApp.newDataValidation().requireValueInRange(sourceRange).build();
const rules = destinationRange.getDataValidations();
for (let i = 0; i < rules.length; i++) {
  for (let j = 0; j < rules[i].length; j++) {
    rules[i][j] = rule;
  }
}
destinationRange.setDataValidations(rules);

পরামিতি

নাম টাইপ বর্ণনা
rules Data Validation[][] সেট করার জন্য ডেটা বৈধতা বিধিগুলির একটি দ্বি-মাত্রিক অ্যারে; null মানগুলি ডেটা বৈধতা অপসারণ করে।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Color(color)

সিএসএস স্বরলিপিতে ফন্টের রঙ সেট করে (যেমন '#ffffff' বা 'white' )।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
cell.setFontColor('red');

পরামিতি

নাম টাইপ বর্ণনা
color String সিএসএস নোটেশনে ফন্টের রঙ (যেমন '#ffffff' বা 'white' ); একটি null মান রঙ পুনরায় সেট করে।

প্রত্যাবর্তন

Range - এই পরিসীমা, চেইনের জন্য।

অনুমোদন

এই পদ্ধতিটি ব্যবহার করে এমন স্ক্রিপ্টগুলি নিম্নলিখিত এক বা একাধিক স্কোপ সহ অনুমোদনের প্রয়োজন:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Color Object(color)

প্রদত্ত রেঞ্জের ফন্ট রঙ সেট করে।

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const color = SpreadsheetApp.newColor()
                  .setThemeColor(SpreadsheetApp.ThemeColorType.TEXT)
                  .build();

const cell = sheet.getRange('B2');
cell.setFontColor(color);

পরামিতি

নাম টাইপ বর্ণনা
color Color The font color to set; a null value resets the color.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Color Objects(colors)

Sets a rectangular grid of font colors (must match dimensions of this range).

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const colorAccent1 = SpreadsheetApp.newColor()
                         .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT1)
                         .build();
const colorAccent2 = SpreadsheetApp.newColor()
                         .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT2)
                         .build();
const colorAccent3 = SpreadsheetApp.newColor()
                         .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT3)
                         .build();
const colorAccent4 = SpreadsheetApp.newColor()
                         .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT4)
                         .build();

const colors = [
  [colorAccent1, colorAccent2],
  [colorAccent3, colorAccent4],
];

const cell = sheet.getRange('B5:C6');
cell.setFontColorObjects(colors);

পরামিতি

নাম টাইপ বর্ণনা
colors Color[][] A two-dimensional array of colors; null values reset the font color.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Colors(colors)

Sets a rectangular grid of font colors (must match dimensions of this range). The colors are in CSS notation (such as '#ffffff' or 'white' ).

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const colors = [
  ['red', 'white', 'blue'],
  ['#FF0000', '#FFFFFF', '#0000FF'],  // These are the hex equivalents
];

const cell = sheet.getRange('B5:D6');
cell.setFontColors(colors);

পরামিতি

নাম টাইপ বর্ণনা
colors Object[][] A two-dimensional array of colors in CSS notation (such as '#ffffff' or 'white' ); null values reset the color.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Families(fontFamilies)

Sets a rectangular grid of font families (must match dimensions of this range). Examples of font families are "Arial" or "Helvetica".

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const fonts = [
  ['Arial', 'Helvetica', 'Verdana'],
  ['Courier New', 'Arial', 'Helvetica'],
];

const cell = sheet.getRange('B2:D3');
cell.setFontFamilies(fonts);

পরামিতি

নাম টাইপ বর্ণনা
font Families Object[][] A two-dimensional array of font families; null values reset the font family.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Family(fontFamily)

Sets the font family, such as "Arial" or "Helvetica".

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
cell.setFontFamily('Helvetica');

পরামিতি

নাম টাইপ বর্ণনা
font Family String The font family to set; a null value resets the font family.

প্রত্যাবর্তন

Range — This range, for chaining.

অনুমোদন

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Line(fontLine)

Sets the font line style of the given range ( 'underline' , 'line-through' , or 'none' ).

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
cell.setFontLine('line-through');

পরামিতি

নাম টাইপ বর্ণনা
font Line String The font line style, either 'underline' , 'line-through' , or 'none' ; a null value resets the font line style.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Lines(fontLines)

Sets a rectangular grid of line styles (must match dimensions of this range).

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// The size of the two-dimensional array must match the size of the range.
const fontLines = [['underline', 'line-through', 'none']];

const range = sheet.getRange('B2:D2');
range.setFontLines(fontLines);

পরামিতি

নাম টাইপ বর্ণনা
font Lines Object[][] A two-dimensional array of font line styles ( 'underline' , 'line-through' , or 'none' ); null values reset the font line style.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Size(size)

Sets the font size, with the size being the point size to use.

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
cell.setFontSize(20);

পরামিতি

নাম টাইপ বর্ণনা
size Integer A font size in point size.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Sizes(sizes)

Sets a rectangular grid of font sizes (must match dimensions of this range). The sizes are in points.

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// The size of the two-dimensional array must match the size of the range.
const fontSizes = [[16, 20, 24]];

const range = sheet.getRange('B2:D2');
range.setFontSizes(fontSizes);

পরামিতি

নাম টাইপ বর্ণনা
sizes Object[][] A two-dimensional array of sizes.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Style(fontStyle)

Set the font style for the given range ( 'italic' or 'normal' ).

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
cell.setFontStyle('italic');

পরামিতি

নাম টাইপ বর্ণনা
font Style String The font style, either 'italic' or 'normal' ; a null value resets the font style.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Styles(fontStyles)

Sets a rectangular grid of font styles (must match dimensions of this range).

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// The size of the two-dimensional array must match the size of the range.
const fontStyles = [['italic', 'normal']];

const range = sheet.getRange('B2:C2');
range.setFontStyles(fontStyles);

পরামিতি

নাম টাইপ বর্ণনা
font Styles Object[][] A two-dimensional array of font styles, either 'italic' or 'normal' ; null values reset the font style.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Weight(fontWeight)

Set the font weight for the given range (normal/bold).

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
cell.setFontWeight('bold');

পরামিতি

নাম টাইপ বর্ণনা
font Weight String The font weight, either 'bold' or 'normal' ; a null value resets the font weight.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Font Weights(fontWeights)

Sets a rectangular grid of font weights (must match dimensions of this range). An example of a font weight is "bold".

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// The size of the two-dimensional array must match the size of the range.
const fontStyles = [['bold', 'bold', 'normal']];

const range = sheet.getRange('B2:D2');
range.setFontWeights(fontStyles);

পরামিতি

নাম টাইপ বর্ণনা
font Weights Object[][] A two-dimensional array of font weights, either 'bold' or 'normal' ; null values reset the font weight.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Formula(formula)

Updates the formula for this range. The given formula must be in A1 notation.

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B5');
cell.setFormula('=SUM(B3:B4)');

পরামিতি

নাম টাইপ বর্ণনা
formula String A string representing the formula to set for the cell.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Formula R1C1(formula)

Updates the formula for this range. The given formula must be in R1C1 notation.

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B5');
// This sets the formula to be the sum of the 3 rows above B5
cell.setFormulaR1C1('=SUM(R[-3]C[0]:R[-1]C[0])');

পরামিতি

নাম টাইপ বর্ণনা
formula String A string formula.

প্রত্যাবর্তন

Range — This range, for chaining.

অনুমোদন

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Formulas(formulas)

Sets a rectangular grid of formulas (must match dimensions of this range). The given formulas must be in A1 notation. This method takes a two-dimensional array of formulas, indexed by row, then by column. The array dimensions must correspond to the range dimensions.

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// This sets the formulas to be a row of sums, followed by a row of averages
// right below. The size of the two-dimensional array must match the size of the
// range.
const formulas = [
  ['=SUM(B2:B4)', '=SUM(C2:C4)', '=SUM(D2:D4)'],
  ['=AVERAGE(B2:B4)', '=AVERAGE(C2:C4)', '=AVERAGE(D2:D4)'],
];

const cell = sheet.getRange('B5:D6');
cell.setFormulas(formulas);

পরামিতি

নাম টাইপ বর্ণনা
formulas String[][] A two-dimensional string array of formulas.

প্রত্যাবর্তন

Range — This range, for chaining.

অনুমোদন

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Formulas R1C1(formulas)

Sets a rectangular grid of formulas (must match dimensions of this range). The given formulas must be in R1C1 notation.

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// This creates formulas for a row of sums, followed by a row of averages.
const sumOfRowsAbove = '=SUM(R[-3]C[0]:R[-1]C[0])';
const averageOfRowsAbove = '=AVERAGE(R[-4]C[0]:R[-2]C[0])';

// The size of the two-dimensional array must match the size of the range.
const formulas = [
  [sumOfRowsAbove, sumOfRowsAbove, sumOfRowsAbove],
  [averageOfRowsAbove, averageOfRowsAbove, averageOfRowsAbove],
];

const cell = sheet.getRange('B5:D6');
// This sets the formula to be the sum of the 3 rows above B5.
cell.setFormulasR1C1(formulas);

পরামিতি

নাম টাইপ বর্ণনা
formulas String[][] A two-dimensional array of formulas in R1C1 format.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Horizontal Alignment(alignment)

Set the horizontal (left to right) alignment for the given range (left/center/right).

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
cell.setHorizontalAlignment('center');

পরামিতি

নাম টাইপ বর্ণনা
alignment String The alignment, either 'left' , 'center' or 'normal' ; a null value resets the alignment.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Horizontal Alignments(alignments)

Sets a rectangular grid of horizontal alignments. see set Horizontal Alignment(alignment)

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// The size of the two-dimensional array must match the size of the range.
const horizontalAlignments = [['left', 'right', 'center']];

const range = sheet.getRange('B2:D2');
range.setHorizontalAlignments(horizontalAlignments);

পরামিতি

নাম টাইপ বর্ণনা
alignments Object[][] A two-dimensional array of alignments, either 'left' , 'center' or 'normal' ; a null value resets the alignment.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

এছাড়াও দেখুন


set Note(note)

Sets the note to the given value.

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
cell.setNote('This is a note');

পরামিতি

নাম টাইপ বর্ণনা
note String The note value to set for the range; a null value removes the note.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Notes(notes)

Sets a rectangular grid of notes (must match dimensions of this range).

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// The size of the two-dimensional array must match the size of the range.
const notes = [
  ['it goes', 'like this', 'the fourth, the fifth'],
  ['the minor fall', 'and the', 'major lift'],
];

const cell = sheet.getRange('B2:D3');
cell.setNotes(notes);

পরামিতি

নাম টাইপ বর্ণনা
notes Object[][] A two-dimensional array of notes; null values remove the note.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

এছাড়াও দেখুন


set Number Format(numberFormat)

Sets the number or date format to the given formatting string. The accepted format patterns are described in the Sheets API documentation .

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
// Always show 3 decimal points
cell.setNumberFormat('0.000');

পরামিতি

নাম টাইপ বর্ণনা
number Format String A number format string.

প্রত্যাবর্তন

Range — This range, for chaining.

অনুমোদন

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Number Formats(numberFormats)

Sets a rectangular grid of number or date formats (must match dimensions of this range). The values are format pattern strings as described in the Sheets API documentation .

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// The size of the two-dimensional array must match the size of the range.
const formats = [['0.000', '0,000,000', '$0.00']];

const range = sheet.getRange('B2:D2');
range.setNumberFormats(formats);

পরামিতি

নাম টাইপ বর্ণনা
number Formats Object[][] A two-dimensional array of number formats.

প্রত্যাবর্তন

Range — This range, for chaining.

অনুমোদন

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Rich Text Value(value)

Sets the Rich Text value for the cells in the range.

// Sets all cells in range B2:D4 to have the text "Hello world", with "Hello"
// bolded.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('B2:D4');
const bold = SpreadsheetApp.newTextStyle().setBold(true).build();
const richText = SpreadsheetApp.newRichTextValue()
                     .setText('Hello world')
                     .setTextStyle(0, 5, bold)
                     .build();
range.setRichTextValue(richText);

পরামিতি

নাম টাইপ বর্ণনা
value Rich Text Value The desired Rich Text value.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Rich Text Values(values)

Sets a rectangular grid of Rich Text values.

// Sets the cells in range A1:A2 to have Rich Text values.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:A2');
const bold = SpreadsheetApp.newTextStyle().setBold(true).build();
const italic = SpreadsheetApp.newTextStyle().setItalic(true).build();
const richTextA1 = SpreadsheetApp.newRichTextValue()
                       .setText('This cell is bold')
                       .setTextStyle(bold)
                       .build();
const richTextA2 = SpreadsheetApp.newRichTextValue()
                       .setText('bold words, italic words')
                       .setTextStyle(0, 11, bold)
                       .setTextStyle(12, 24, italic)
                       .build();
range.setRichTextValues([[richTextA1], [richTextA2]]);

পরামিতি

নাম টাইপ বর্ণনা
values Rich Text Value[][] The desired Rich Text values.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

Sets whether or not the range should show hyperlinks.

// Opens the spreadsheet file by its URL. If you created your script from within
// a Google Sheets file, you can useSpreadsheetApp.getActiveSpreadsheet()
// instead.
// TODO(developer): Replace the URL with your own.
const ss = SpreadsheetApp.openByUrl(
    'https://docs.google.com/spreadsheets/d/abc123456/edit',
);

// Gets Sheet1 by its name.
const sheet = ss.getSheetByName('Sheet1');

// Gets cell A30 and sets its hyperlink value.
const range = sheet.getRange('A30');
range.setValue('https://www.example.com');

// Sets cell A30 to show hyperlinks.
range.setShowHyperlink(true);

পরামিতি

নাম টাইপ বর্ণনা
show Hyperlink Boolean Whether or not to show the hyperlink.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Text Direction(direction)

Sets the text direction for the cells in the range. If a specified direction is null , the direction is inferred and then set.

// Sets right-to-left text direction for the range.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('B5:C6');
range.setTextDirection(SpreadsheetApp.TextDirection.RIGHT_TO_LEFT);

পরামিতি

নাম টাইপ বর্ণনা
direction Text Direction The desired text direction; if null the direction is inferred before setting.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Text Directions(directions)

Sets a rectangular grid of text directions. If a specified direction is null , the direction is inferred and then set.

// Copies all of the text directions from range A1:B2 over to range C5:D6.
const sheet = SpreadsheetApp.getActiveSheet();
const range1 = sheet.getRange('A1:B2');
const range2 = sheet.getRange('C5:D6');

range2.setTextRotations(range1.getTextDirections());

পরামিতি

নাম টাইপ বর্ণনা
directions Text Direction[][] The desired text directions; if a specified direction is null it is inferred before setting.

প্রত্যাবর্তন

Range — This range, for chaining.

অনুমোদন

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Text Rotation(degrees)

Sets the text rotation settings for the cells in the range. The input corresponds to the angle between the standard text orientation and the desired orientation. An input of zero indicates that the text is set to the standard orientation.

For left to right text direction, positive angles are in the counterclockwise direction, whereas for right to left they are in the clockwise direction.

// Sets all cell's in range B2:D4 to have text rotated up 45 degrees.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('B2:D4');

range.setTextRotation(45);

পরামিতি

নাম টাইপ বর্ণনা
degrees Integer The desired angle between the standard orientation and the desired orientation. For left to right text, positive angles are in the counterclockwise direction.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Text Rotation(rotation)

Sets the text rotation settings for the cells in the range.

// Sets all cell's in range B2:D4 to have the same text rotation settings as
// cell A1.
const sheet = SpreadsheetApp.getActiveSheet();

const rotation = sheet.getRange('A1').getTextRotation();

sheet.getRange('B2:D4').setTextRotation(rotation);

পরামিতি

নাম টাইপ বর্ণনা
rotation Text Rotation The desired text rotation settings.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Text Rotations(rotations)

Sets a rectangular grid of text rotations.

// Copies all of the text rotations from range A1:B2 over to range C5:D6.
const sheet = SpreadsheetApp.getActiveSheet();
const range1 = sheet.getRange('A1:B2');
const range2 = sheet.getRange('C5:D6');

range2.setTextRotations(range1.getTextRotations());

পরামিতি

নাম টাইপ বর্ণনা
rotations Text Rotation[][] The desired text rotation settings.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Text Style(style)

Sets the text style for the cells in the range.

// Sets the cells in range C5:D6 to have underlined size 15 font.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('C5:D6');
const style =
    SpreadsheetApp.newTextStyle().setFontSize(15).setUnderline(true).build();
range.setTextStyle(style);

পরামিতি

নাম টাইপ বর্ণনা
style Text Style The desired text style.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Text Styles(styles)

Sets a rectangular grid of text styles.

// Sets text styles for cells in range A1:B2
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B2');
const bold = SpreadsheetApp.newTextStyle().setBold(true).build();
const otherStyle = SpreadsheetApp.newTextStyle()
                       .setBold(true)
                       .setUnderline(true)
                       .setItalic(true)
                       .setForegroundColor('#335522')
                       .setFontSize(44)
                       .build();
range.setTextStyles([
  [bold, otherStyle],
  [otherStyle, bold],
]);

পরামিতি

নাম টাইপ বর্ণনা
styles Text Style[][] The desired text styles.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Value(value)

Sets the value of the range. The value can be numeric, string, boolean or date. If it begins with '=' it is interpreted as a formula.

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
cell.setValue(100);

পরামিতি

নাম টাইপ বর্ণনা
value Object The value for the range.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Values(values)

Sets a rectangular grid of values (must match dimensions of this range). If a value begins with = , it's interpreted as a formula.

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// The size of the two-dimensional array must match the size of the range.
const values = [['2.000', '1,000,000', '$2.99']];

const range = sheet.getRange('B2:D2');
range.setValues(values);

পরামিতি

নাম টাইপ বর্ণনা
values Object[][] A two-dimensional array of values.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Vertical Alignment(alignment)

Set the vertical (top to bottom) alignment for the given range (top/middle/bottom).

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
cell.setVerticalAlignment('middle');

পরামিতি

নাম টাইপ বর্ণনা
alignment String The alignment, either 'top' , 'middle' or 'bottom' ; a null value resets the alignment.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Vertical Alignments(alignments)

Sets a rectangular grid of vertical alignments (must match dimensions of this range).

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// The size of the two-dimensional array must match the size of the range.
const alignments = [['top', 'middle', 'bottom']];

const range = sheet.getRange('B2:D2');
range.setVerticalAlignments(alignments);

পরামিতি

নাম টাইপ বর্ণনা
alignments Object[][] A two-dimensional array of alignments, either 'top' , 'middle' or 'bottom' ; a null value resets the alignment.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

এছাড়াও দেখুন


set Vertical Text(isVertical)

Sets whether or not to stack the text for the cells in the range. If the text is stacked vertically, the degree text rotation setting is ignored.

// Sets all cell's in range B2:D4 to have vertically stacked text.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('B2:D4');

range.setVerticalText(true);

পরামিতি

নাম টাইপ বর্ণনা
is Vertical Boolean Whether or not to stack the text.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Wrap(isWrapEnabled)

Set the cell wrap of the given range.

Cells with wrap enabled (the default) resize to display their full content. Cells with wrap disabled display as much as possible in the cell without resizing or running to multiple lines.

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

const cell = sheet.getRange('B2');
cell.setWrap(true);

পরামিতি

নাম টাইপ বর্ণনা
is Wrap Enabled Boolean Whether to wrap text or not.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Wrap Strategies(strategies)

Sets a rectangular grid of wrap strategies.

// Copies all of the wrap strategies from range A1:B2 over to range C5:D6.
const sheet = SpreadsheetApp.getActiveSheet();
const range1 = sheet.getRange('A1:B2');
const range2 = sheet.getRange('C5:D6');

range2.setWrapStrategies(range1.getWrapStrategies());

পরামিতি

নাম টাইপ বর্ণনা
strategies Wrap Strategy[][] The desired wrapping strategies.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Wrap Strategy(strategy)

Sets the text wrapping strategy for the cells in the range.

// Sets all cells in range B2:D4 to use the clip wrap strategy.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('B2:D4');

range.setWrapStrategy(SpreadsheetApp.WrapStrategy.CLIP);

পরামিতি

নাম টাইপ বর্ণনা
strategy Wrap Strategy The desired wrapping strategy.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

set Wraps(isWrapEnabled)

Sets a rectangular grid of word wrap policies (must match dimensions of this range). Cells with wrap enabled (the default) resize to display their full content. Cells with wrap disabled display as much as possible in the cell without resizing or running to multiple lines.

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];

// The size of the two-dimensional array must match the size of the range.
const wraps = [[true, true, false]];

const range = sheet.getRange('B2:D2');
range.setWraps(wraps);

পরামিতি

নাম টাইপ বর্ণনা
is Wrap Enabled Object[][] A two-dimensional array of wrap variables that determine whether to wrap text in a cell or not.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

এছাড়াও দেখুন


shift Column Group Depth(delta)

Changes the column grouping depth of the range by the specified amount.

This has the effect of creating, modifying, or deleting groups that intersect with the range. For positive deltas, groups are created and/or modified; for negative deltas, groups are destroyed and/or modified.

This has no effect when decreasing the group depth below zero or above eight.

If the column group control position is BEFORE , this throws an error when attempting to shift the depth of the first row.

const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
const range = sheet.getActiveRange();

// The column grouping depth is increased by 1.
range.shiftColumnGroupDepth(1);

// The column grouping depth is decreased by 1.
range.shiftColumnGroupDepth(-1);

পরামিতি

নাম টাইপ বর্ণনা
delta Integer The amount by which to change the column group depth of this range.

প্রত্যাবর্তন

Range — This range, for chaining.

নিক্ষেপ করে

Error — when attempting to shift the depth of the first column when the control position is Group Control Toggle Position.BEFORE

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

shift Row Group Depth(delta)

Changes the row grouping depth of the range by the specified amount.

This has the effect of creating, modifying, or deleting groups that intersect with the range. For positive deltas, groups are created and/or modified; for negative deltas, groups are destroyed and/or modified.

This has no effect when decreasing the group depth below zero or above eight.

If the row group control position is BEFORE , this throws an error when attempting to shift the depth of the first row.

const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
const range = sheet.getActiveRange();

// The row grouping depth is increased by 1.
range.shiftRowGroupDepth(1);

// The row grouping depth is decreased by 1.
range.shiftRowGroupDepth(-1);

পরামিতি

নাম টাইপ বর্ণনা
delta Integer The amount by which to change the row group depth of this range.

প্রত্যাবর্তন

Range — This range, for chaining.

নিক্ষেপ করে

Error — when attempting to shift the depth of the first row when the control position is Group Control Toggle Position.BEFORE

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

sort(sortSpecObj)

Sorts the cells in the given range, by column and order specified.

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheets()[0];
const range = sheet.getRange('A1:C7');

// Sorts by the values in the first column (A)
range.sort(1);

// Sorts by the values in the second column (B)
range.sort(2);

// Sorts descending by column B
range.sort({column: 2, ascending: false});

// Sorts descending by column B, then ascending by column A
// Note the use of an array
range.sort([
  {column: 2, ascending: false},
  {column: 1, ascending: true},
]);

// For rows that are sorted in ascending order, the "ascending" parameter is
// optional, and just an integer with the column can be used instead. Note that
// in general, keeping the sort specification consistent results in more
// readable code. You can express the earlier sort as:
range.sort([{column: 2, ascending: false}, 1]);

// Alternatively, if you want all columns to be in ascending order, you can use
// the following (this makes column 2 ascending)
range.sort([2, 1]);
// ... which is equivalent to
range.sort([
  {column: 2, ascending: true},
  {column: 1, ascending: true},
]);

পরামিতি

নাম টাইপ বর্ণনা
sort Spec Obj Object The columns to sort by.

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

split Text To Columns()

Splits a column of text into multiple columns based on an auto-detected delimiter.

// A1:A3 has the following values:
//           A                  B                 C
// 1 |one,one,one      |                 |                 |
// 2 |two,two,two      |                 |                 |
// 3 |three,three,three|                 |                 |

const range = SpreadsheetApp.getActiveSheet().getRange('A1:A3');
range.splitTextToColumns();

// Result after splitting the text to columns:
//           A                  B                 C
// 1 |one              |one              |one              |
// 2 |two              |two              |two              |
// 3 |three            |three            |three            |

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

split Text To Columns(delimiter)

Splits a column of text into multiple columns using the specified string as a custom delimiter.

// A1:A3 has the following values:
//           A                  B                 C
// 1 |one#one#one      |                 |                 |
// 2 |two#two#two      |                 |                 |
// 3 |three#three#three|                 |                 |

const range = SpreadsheetApp.getActiveSheet().getRange('A1:A3');
range.splitTextToColumns('#');

// Result after splitting the text to columns:
//           A                  B                 C
// 1 |one              |one              |one              |
// 2 |two              |two              |two              |
// 3 |three            |three            |three            |

পরামিতি

নাম টাইপ বর্ণনা
delimiter String The custom delimiter to split on.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

split Text To Columns(delimiter)

Splits a column of text into multiple columns based on the specified delimiter.

// A1:A3 has the following values:
//           A                  B                 C
// 1 |one;one;one      |                 |                 |
// 2 |two;two;two      |                 |                 |
// 3 |three;three;three|                 |                 |

const range = SpreadsheetApp.getActiveSheet().getRange('A1:A3');
range.splitTextToColumns(SpreadsheetApp.TextToColumnsDelimiter.SEMICOLON);

// Result after splitting the text to columns:
//           A                  B                 C
// 1 |one              |one              |one              |
// 2 |two              |two              |two              |
// 3 |three            |three            |three            |

পরামিতি

নাম টাইপ বর্ণনা
delimiter Text To Columns Delimiter The preset delimiter to split on.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

trim Whitespace()

Trims the whitespace (such as spaces, tabs, or new lines) in every cell in this range. Removes all whitespace from the start and end of each cell's text, and reduces any subsequence of remaining whitespace characters to a single space.

const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
const range = sheet.getRange('A1:A4');
range.activate();
range.setValues([
  ' preceding space',
  'following space ',
  'two  middle  spaces',
  '   =SUM(1,2)',
]);

range.trimWhitespace();

const values = range.getValues();
// Values are ['preceding space', 'following space', 'two middle spaces',
// '=SUM(1,2)']

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

uncheck()

Changes the state of the checkboxes in the range to “unchecked”. Ignores the cells in the range which currently do not contain either the checked or unchecked value configured.

// Changes the state of cells which currently contain either the checked or
// unchecked value configured in the range A1:B10 to 'unchecked'.
const range = SpreadsheetApp.getActive().getRange('A1:B10');
range.uncheck();

প্রত্যাবর্তন

Range — This range, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

Deprecated methods