স্প্রেডশিট রেঞ্জ অ্যাক্সেস এবং সংশোধন করুন। একটি রেঞ্জ একটি শীটে একটি একক ঘর বা একটি শীটে সংলগ্ন কোষের একটি গ্রুপ হতে পারে।
পদ্ধতি
| পদ্ধতি | রিটার্ন টাইপ | সংক্ষিপ্ত বিবরণ |
|---|---|---|
activate() | Range | নির্দিষ্ট পরিসরটিকে active range হিসেবে সেট করে, পরিসরের উপরের বাম ঘরটিকে current cell হিসেবে সেট করে। |
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 | যদি নির্দিষ্ট মাত্রা Dimension.ROWS হয় তাহলে প্রসারিত পরিসর Direction.UP এবং Direction.DOWN এর একটি অনুলিপি ফেরত পাঠায়, অথবা যদি মাত্রা Dimension.COLUMNS হয় তাহলে Direction.NEXT এবং Direction.PREVIOUS এর একটি অনুলিপি ফেরত পাঠায়। |
get Data Source Formula() | Data Source Formula |null | পরিসরের প্রথম ঘরের জন্য Data Source Formula প্রদান করে, অথবা যদি ঘরে ডেটা সোর্স সূত্র না থাকে তবে null প্রদান করে। |
get Data Source Formulas() | Data Source Formula[] | পরিসরের কোষগুলির জন্য Data Source Formula s প্রদান করে। |
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 | এই পরিসরের মধ্যে থাকা ডেটাগুলিকে ডেটাটেবিল হিসেবে ফেরত পাঠান। |
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 | এই পরিসরটি যে শিটের অন্তর্গত, সেখানে ফিল্টারটি ফেরত পাঠায়, অথবা যদি শিটে কোনও ফিল্টার না থাকে, তাহলে 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 | পরিসরের প্যারেন্ট শিটের গ্রিড আইডি প্রদান করে। |
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 | পরিসরের উপরের বাম ঘরের জন্য রিচ টেক্সট মান প্রদান করে, অথবা যদি ঘরের মান টেক্সট না হয় তবে 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 মান ব্যবহার করে (০ থেকে ২৫৫ এর মধ্যে পূর্ণসংখ্যা সহ) প্রদত্ত রঙে পটভূমি সেট করে। |
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()
নির্দিষ্ট পরিসরটিকে active range হিসেবে সেট করে, পরিসরের উপরের বাম ঘরটিকে current cell হিসেবে সেট করে।
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: A1:A4 এর বর্তমান মানের উপর ভিত্তি করে ক্রমবর্ধমান সংখ্যার একটি সিরিজ দিয়ে A1: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()
পরিসরের যেকোনো বহু-কলাম কোষকে আবার পৃথক কোষে ভেঙে দিন।
এই ফাংশনটিকে একটি পরিসরে কল করা একটি পরিসরে নির্বাচন করে Format > Merge cells > Unmerge এ ক্লিক করার সমতুল্য।
// 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());
প্রত্যাবর্তন
Boolean — যদি ব্যবহারকারীর রেঞ্জের প্রতিটি ঘর সম্পাদনা করার অনুমতি থাকে তবে true ; অন্যথায় 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)
প্রদত্ত স্থানে পরিসরের বিন্যাস অনুলিপি করুন। যদি গন্তব্যস্থল উৎস পরিসরের চেয়ে বড় বা ছোট হয় তবে উৎসটি সেই অনুযায়ী পুনরাবৃত্তি করা হয় বা ছেঁটে ফেলা হয়। মনে রাখবেন যে এই পদ্ধতিটি শুধুমাত্র বিন্যাস অনুলিপি করে।
gridId প্যারামিটারের বিস্তারিত বিবরণের জন্য, 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)
পরিসরের বিষয়বস্তু নির্দিষ্ট স্থানে অনুলিপি করুন। যদি গন্তব্যস্থল উৎস পরিসরের চেয়ে বড় বা ছোট হয় তাহলে উৎসটি পুনরাবৃত্তি করা হবে বা সেই অনুযায়ী ছোট করা হবে।
gridId প্যারামিটারের বিস্তারিত বিবরণের জন্য, 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 শিট, যা ডিফল্ট ধরণের শিট, এর জন্য ফিল্টার তৈরি করতে এই পদ্ধতিটি ব্যবহার করুন। গ্রিড শিট হল এমন শিট যা কোনও ডাটাবেসের সাথে সংযুক্ত থাকে না। অন্যান্য ধরণের ফিল্টার তৈরি করতে, নিম্নলিখিতগুলি দেখুন:-
Pivot Table.addFilter(sourceDataColumn, filterCriteria)ব্যবহার করে একটি পিভট টেবিল ফিল্টার তৈরি করুন। -
Data Source Sheet.addFilter(columnName, filterCriteria)ব্যবহার করে একটি ডাটাবেসের সাথে সংযুক্ত একটি শীটের জন্য একটি ফিল্টার তৈরি করুন। -
Data Source Pivot Table.addFilter(columnName, filterCriteria)ব্যবহার করে একটি ডাটাবেসের সাথে সংযুক্ত একটি পিভট টেবিলের জন্য একটি ফিল্টার তৈরি করুন।
প্রত্যাবর্তন
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)
নির্দিষ্ট মাত্রা Dimension.ROWS হলে সম্প্রসারিত Direction.UP এবং Direction.DOWN পরিসরের একটি অনুলিপি ফেরত পাঠায়, অথবা মাত্রা Dimension.COLUMNS হলে Direction.NEXT এবং Direction.PREVIOUS পরিসরের একটি অনুলিপি ফেরত পাঠায়। পরিসরের সম্প্রসারণ টেবিলের মতো সাজানো পরিসরের পাশে থাকা ডেটা সনাক্ত করার উপর ভিত্তি করে করা হয়। প্রসারিত পরিসরটি টেবিলের সীমানা সহ নির্দিষ্ট মাত্রা বরাবর ডেটা সহ সমস্ত সংলগ্ন কোষকে কভার করে। যদি মূল পরিসরটি নির্দিষ্ট মাত্রা বরাবর খালি কোষ দ্বারা বেষ্টিত থাকে, তাহলে পরিসরটি নিজেই ফেরত পাঠানো হয়। এই পদ্ধতিটি পরিসর নির্বাচন করে কলামের জন্য 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 — পরিসরের ডেটা অঞ্চল অথবা প্রতিটি কলাম বা মূল পরিসর দ্বারা বিস্তৃত প্রতিটি সারি জুড়ে একটি পরিসর।
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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 |null — কোষের জন্য Data Source Formula ।
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Data Source Formulas()
পরিসরের কোষগুলির জন্য Data Source Formula s প্রদান করে।
// 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 প্রদান করে, যা চার্ট এবং কোয়েরি তৈরি করতে ব্যবহার করা যেতে পারে।
কোড.জিএস
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(); }
পাইচার্ট.এইচটিএমএল
<!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 — এই পরিসরের জন্য একটি URL যা একটি ডেটা উৎস হিসেবে কাজ করে যা চার্টের মতো অন্যান্য API-তে পাঠানো যেতে পারে।
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Data Table()
এই অবজেক্টের ভিতরে থাকা ডেটা একটি DataTable হিসেবে ফেরত পাঠান।
// 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 |null — ফিল্টার।
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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 — The font family of the cell.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Font Line()
Gets the line style of the cell in the top-left corner of the range ( 'underline' , 'line-through' , or 'none' ).
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D4'); Logger.log(range.getFontLine());
প্রত্যাবর্তন
String — The font line.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Font Lines()
Gets the line style of the cells in the range ( 'underline' , 'line-through' , or '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[][] — A two-dimensional array of font lines associated with cells in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Font Size()
Returns the font size in point size of the cell in the top-left corner of the range.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D4'); Logger.log(range.getFontSize());
প্রত্যাবর্তন
Integer — The font size in point size.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Font Sizes()
Returns the font sizes of the cells in the range.
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[][] — A two-dimensional array of font sizes of text associated with cells in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Font Style()
Returns the font style ( 'italic' or 'normal' ) of the cell in the top-left corner of the range.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D4'); Logger.log(range.getFontStyle());
প্রত্যাবর্তন
String — The font style of the text in the cell.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Font Styles()
Returns the font styles of the cells in the range.
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[][] — A two-dimensional array of font styles of text associated with cells in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Font Weight()
Returns the font weight (normal/bold) of the cell in the top-left corner of the range.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D4'); Logger.log(range.getFontWeight());
প্রত্যাবর্তন
String — The font weight of the text in the cell.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Font Weights()
Returns the font weights of the cells in the range.
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[][] — A two-dimensional array of font weights of text associated with cells in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Formula()
Returns the formula (A1 notation) for the top-left cell of the range, or an empty string if the cell is empty or doesn't contain a formula.
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 — The formula for the cell.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Formula R1C1()
Returns the formula (R1C1 notation) for a given cell, or null if none.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B5'); const formula = range.getFormulaR1C1(); Logger.log(formula);
প্রত্যাবর্তন
String — The formula in R1C1 notation.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Formulas()
Returns the formulas (A1 notation) for the cells in the range. Entries in the 2D array are empty strings for cells with no formula.
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[][] — A two-dimensional array of formulas in string format.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Formulas R1C1()
Returns the formulas (R1C1 notation) for the cells in the range. Entries in the 2D array are null for cells with no formula.
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[][] — A two-dimensional array of formulas in R1C1 notation.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Grid Id()
Returns the grid ID of the range's parent sheet. IDs are random non-negative int values.
// 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 — The grid ID of the parent sheet.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Height()
Returns the height of the range.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D4'); // logs 3.0 Logger.log(range.getHeight());
প্রত্যাবর্তন
Integer — The height of the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Horizontal Alignment()
Returns the horizontal alignment of the text (left/center/right) of the cell in the top-left corner of the range.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D4'); Logger.log(range.getHorizontalAlignment());
প্রত্যাবর্তন
String — The horizontal alignment of the text in the cell.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Horizontal Alignments()
Returns the horizontal alignments of the cells in the range.
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[][] — A two-dimensional array of horizontal alignments of text associated with cells in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Last Column()
Returns the end column position.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D4'); // Logs "4.0" Logger.log(range.getLastColumn());
প্রত্যাবর্তন
Integer — The range's ending column position in the spreadsheet.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Last Row()
Returns the end row position.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D4'); // Logs "4.0" Logger.log(range.getLastRow());
প্রত্যাবর্তন
Integer — The range's ending row position in the spreadsheet.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Merged Ranges()
Returns an array of Range objects representing merged cells that either are fully within the current range, or contain at least one cell in the current 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[] — An array of Range objects, representing merged cells overlapping the range.
get Next Data Cell(direction)
Starting at the cell in the first column and row of the range, returns the next cell in the given direction that is the edge of a contiguous range of cells with data in them or the cell at the edge of the spreadsheet in that direction. This is equivalent to typing Ctrl+[arrow key] in the editor.
// 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 | The direction in which to find the next data region edge cell. |
প্রত্যাবর্তন
Range — The data region edge cell or the cell at the edge of the spreadsheet.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Note()
Returns the note associated with the given range.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D4'); Logger.log(range.getNote());
প্রত্যাবর্তন
String — The note associated with the given cell.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Notes()
Returns the notes associated with the cells in the range.
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[][] — A two-dimensional array of notes associated with cells in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Num Columns()
Returns the number of columns in this range.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D5'); Logger.log(range.getNumColumns());
প্রত্যাবর্তন
Integer — The number of columns in this range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Num Rows()
Returns the number of rows in this range.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D5'); Logger.log(range.getNumRows());
প্রত্যাবর্তন
Integer — The number of rows in this range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Number Format()
Get the number or date formatting of the top-left cell of the given range. The returned format patterns are described in the Sheets API documentation .
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const cell = sheet.getRange('C4'); Logger.log(cell.getNumberFormat());
প্রত্যাবর্তন
String — The number format of the top-left cell of the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Number Formats()
Returns the number or date formats for the cells in the range. The returned format patterns are described in the Sheets API documentation .
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[][] — A two-dimensional array of number formats.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Rich Text Value()
Returns the Rich Text value for the top left cell of the range, or null if the cell value is not text.
// 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 — The Rich Text value of the top left cell in the range, or null if the cell value is not text.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Rich Text Values()
Returns the Rich Text values for the cells in the range.
// 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[][] — A two-dimensional array of Rich Text values.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Row()
Returns the row position for this range. Identical to get Row Index() .
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2'); Logger.log(range.getRow());
প্রত্যাবর্তন
Integer — The row position of the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Row Index()
Returns the row position for this range. Identical to get Row() .
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2'); Logger.log(range.getRowIndex());
প্রত্যাবর্তন
Integer — The row position of the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
আরো দেখুন
get Sheet()
Returns the sheet this range belongs to.
// 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 — The sheet that this range belongs to.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Text Direction()
Returns the text direction for the top left cell of the range. Returns null if the cell text direction is determined with automatic detection.
// Get the text direction of cell B1. const sheet = SpreadsheetApp.getActiveSheet(); const range = sheet.getRange('B1:D4'); Logger.log(range.getTextDirection());
প্রত্যাবর্তন
Text Direction — The text direction of the top left cell in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Text Directions()
Returns the text directions for the cells in the range. Entries in the 2D array are null for cells using automatic detection.
// 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[][] — A two-dimensional array of text directions.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Text Rotation()
Returns the text rotation settings for the top left cell of the range.
// Log the text rotation settings for a cell. const sheet = SpreadsheetApp.getActiveSheet(); const cell = sheet.getRange('A1'); Logger.log(cell.getTextRotation());
প্রত্যাবর্তন
Text Rotation — The text rotation settings.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Text Rotations()
Returns the text rotation settings for the cells in the range.
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[][] — A two-dimensional array of text rotations associated with cells in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Text Style()
Returns the text style for the top left cell of the range.
// 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 — The text style of the top left cell in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Text Styles()
Returns the text styles for the cells in the range.
// 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[][] — A two-dimensional array of text styles.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Value()
Returns the value of the top-left cell in the range. The value may be of type Number , Boolean , Date , or String depending on the value of the cell. Empty cells return an empty 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 — The value in this cell.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Values()
Returns the rectangular grid of values for this range.
Returns a two-dimensional array of values, indexed by row, then by column. The values may be of type Number , Boolean , Date , or String , depending on the value of the cell. Empty cells are represented by an empty string in the array. Remember that while a range index starts at 1, 1 , the JavaScript array is indexed from [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 value isn't a legal parameter. get Values() fails to return data to a web app if the range contains a cell with a Date value. Instead, transform all the values retrieved from the sheet to a supported JavaScript primitive like a Number , Boolean , or String .প্রত্যাবর্তন
Object[][] — A two-dimensional array of values.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Vertical Alignment()
Returns the vertical alignment (top/middle/bottom) of the cell in the top-left corner of the range.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D4'); Logger.log(range.getVerticalAlignment());
প্রত্যাবর্তন
String — The vertical alignment of the text in the cell.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Vertical Alignments()
Returns the vertical alignments of the cells in the range.
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[][] — A two-dimensional array of vertical alignments of text associated with cells in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Width()
Returns the width of the range in columns.
// 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 — The number of columns in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Wrap()
Returns whether the text in the cell wraps. To get more granular wrap strategy, use get Wrap Strategy() .
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D4'); Logger.log(range.getWrap());
প্রত্যাবর্তন
Boolean — Whether the text in this cell wraps or not.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Wrap Strategies()
Returns the text wrapping strategies for the cells in the range.
// 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[][] — A two-dimensional array of text wrapping strategies.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Wrap Strategy()
Returns the text wrapping strategy for the top left cell of the range.
// Get the text wrapping strategy of cell B1. const sheet = SpreadsheetApp.getActiveSheet(); const range = sheet.getRange('B1:D4'); Logger.log(range.getWrapStrategy());
প্রত্যাবর্তন
Wrap Strategy — The text wrapping strategy of the top left cell in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Wraps()
Returns whether the text in the cells wrap. To get more granular wrap strategy, use 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[][] — A two-dimensional array of vertical alignments of text associated with cells in the range.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
insert Cells(shiftDimension)
Inserts empty cells into this range. The new cells retain any formatting present in the cells previously occupying this range. Existing data in the sheet along the provided dimension is shifted away from the inserted range.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('A1:D10'); range.insertCells(SpreadsheetApp.Dimension.COLUMNS);
পরামিতি
| নাম | আদর্শ | বিবরণ |
|---|---|---|
shift Dimension | Dimension | The dimension along which to shift existing data. |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
insert Checkboxes()
Inserts checkboxes into each cell in the range, configured with true for checked and false for unchecked. Sets the value of all cells in the range to 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 — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
insert Checkboxes(checkedValue)
Inserts checkboxes into each cell in the range, configured with a custom value for checked and the empty string for unchecked. Sets the value of each cell in the range to the empty string.
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 | The checked value for the checkbox data validation. |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
insert Checkboxes(checkedValue, uncheckedValue)
Inserts checkboxes into each cell in the range, configured with custom values for the checked and unchecked states. Sets the value of each cell in the range to the custom unchecked value.
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 | The checked value for the checkbox data validation. |
unchecked Value | Object | The unchecked value for the checkbox data validation. |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
is Blank()
Returns true if the range is totally blank.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D4'); Logger.log(range.isBlank());
প্রত্যাবর্তন
Boolean — true if the range is blank; false otherwise.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
is Checked()
Returns whether all cells in the range have their checkbox state as 'checked'. Returns null if some cells are checked and the rest unchecked, or if some cells do not have checkbox data validation.
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 , if all cells in the range are checked, false if all cells in the range are unchecked, or null if any of the cells are unchecked or do not have checkbox data validation.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
is End Column Bounded()
Determines whether the end of the range is bound to a particular column. For example, for the ranges A1:B10 or B:B , which are bound to columns at the end of the range, this method returns true ; for the ranges 3:7 or A1:5 , which are bound only to particular rows at the end of the range, this method returns 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 if the end of the range is bound to a particular column; false otherwise.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
is End Row Bounded()
Determines whether the end of the range is bound to a particular row. For example, for the ranges A1:B10 or 3:7 , which are bound to rows at the end of the range, this method returns true ; for the ranges B:B or A1:C , which are bound only to particular columns at the end of the range, this method returns 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 if the end of the range is bound to a particular row; false otherwise.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
is Part Of Merge()
Returns true if the cells in the current range overlap any merged cells.
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 if the range overlaps any merged cells, otherwise returns false .
is Start Column Bounded()
Determines whether the start of the range is bound to a particular column. For example, for the ranges A1:B10 or B:B , which are bound to columns at the start of the range, this method returns true ; for the range 3:7 , which is bound only to a row at the start of the range, this method returns 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 if the start of the range is bound to a particular column; false otherwise.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
is Start Row Bounded()
Determines whether the start of the range is bound to a particular row. For example, for the ranges A1:B10 or 3:7 , which are bound to rows at the start of the range, this method returns true ; for the range B:B , which is bound only to a particular column at the start of the range, this method returns 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 if the start of the range is bound to a particular row; false otherwise.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
merge()
Merges the cells in the range together into a single block.
const sheet = SpreadsheetApp.getActiveSheet(); // The code below 2-dimensionally merges the cells in A1 to B3 sheet.getRange('A1:B3').merge();
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
merge Across()
Merge the cells in the range across the columns of the range.
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 — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
merge Vertically()
Merges the cells in the range together.
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 — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
move To(target)
Cut and paste (both format and values) from this range to the target range.
// 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 | A target range to copy this range to; only the top-left cell position is relevant. |
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
offset(rowOffset, columnOffset)
Returns a new range that is offset from this range by the given number of rows and columns (which can be negative). The new range is the same size as the original range.
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 | The number of rows down from the range's top-left cell; negative values represent rows up from the range's top-left cell. |
column Offset | Integer | The number of columns right from the range's top-left cell; negative values represent columns left from the range's top-left cell. |
প্রত্যাবর্তন
Range — This range, for chaining.
offset(rowOffset, columnOffset, numRows)
Returns a new range that is relative to the current range, whose upper left point is offset from the current range by the given rows and columns, and with the given height in cells.
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 | The number of rows down from the range's top-left cell; negative values represent rows up from the range's top-left cell. |
column Offset | Integer | The number of columns right from the range's top-left cell; negative values represent columns left from the range's top-left cell. |
num Rows | Integer | The height in rows of the new range. |
প্রত্যাবর্তন
Range — This range, for chaining.
offset(rowOffset, columnOffset, numRows, numColumns)
Returns a new range that is relative to the current range, whose upper left point is offset from the current range by the given rows and columns, and with the given height and width in cells.
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 | The number of rows down from the range's top-left cell; negative values represent rows up from the range's top-left cell. |
column Offset | Integer | The number of columns right from the range's top-left cell; negative values represent columns left from the range's top-left cell. |
num Rows | Integer | The height in rows of the new range. |
num Columns | Integer | The width in columns of the new range. |
প্রত্যাবর্তন
Range — This range, for chaining.
protect()
Creates an object that can protect the range from being edited except by users who have permission. Until the script actually changes the list of editors for the range (by calling Protection.removeEditor(emailAddress) , Protection.removeEditor(user) , Protection.removeEditors(emailAddresses) , Protection.addEditor(emailAddress) , Protection.addEditor(user) , Protection.addEditors(emailAddresses) , or setting a new value for Protection.setDomainEdit(editable) ), the permissions mirror those of the spreadsheet itself, which effectively means that the range remains unprotected. If the range is already protected, this method creates a new protected range that overlaps the existing one. If a cell is protected by multiple protected ranges and any of them prevent a particular user from editing the cell, then that user is not permitted to edit the cell.
// 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 — An object representing the protection settings.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
randomize()
Randomizes the order of the rows in the given range.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('A1:C7'); // Randomizes the range range.randomize();
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
remove Checkboxes()
Removes all checkboxes from the range. Clears the data validation of each cell, and additionally clears its value if the cell contains either the checked or unchecked value.
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 — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
remove Duplicates()
Removes rows within this range that contain values that are duplicates of values in any previous row. Rows with identical values but different letter cases, formatting, or formulas are considered to be duplicates. This method also removes duplicates rows hidden from view (for example, due to a filter). Content outside of this range isn't removed.
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B1:D7'); // Remove duplicate rows in the range. range.removeDuplicates();
প্রত্যাবর্তন
Range — The resulting range after removing duplicates. The size of the range is reduced by a row for every row removed.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
remove Duplicates(columnsToCompare)
Removes rows within this range that contain values in the specified columns that are duplicates of values any previous row. Rows with identical values but different letter cases, formatting, or formulas are considered to be duplicates. This method also removes duplicates rows hidden from view (for example, due to a filter). Content outside of this range isn't removed.
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[] | The columns to analyze for duplicate values. If no columns are provided then all columns are analyzed for duplicates. |
প্রত্যাবর্তন
Range — The resulting range after removing duplicates. The size of the range is reduced by a row for every row removed.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Background(color)
Sets the background color of all cells in the range in CSS notation (such as '#ffffff' or 'white' ).
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const range = sheet.getRange('B2:D5'); range.setBackground('red');
পরামিতি
| নাম | আদর্শ | বিবরণ |
|---|---|---|
color | String | A color code in CSS notation (such as '#ffffff' or 'white' ); a null value resets the color. |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Background Object(color)
Sets the background color of all cells in the range.
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 | The background color to set; null value resets the background color. |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Background Objects(color)
Sets a rectangular grid of background 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.setBackgroundObjects(colors);
পরামিতি
| নাম | আদর্শ | বিবরণ |
|---|---|---|
color | Color[][] | A two-dimensional array of colors; null values reset the color. |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Background RGB(red, green, blue)
Sets the background to the given color using RGB values (integers between 0 and 255 inclusive).
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 | The red value in RGB notation. |
green | Integer | The green value in RGB notation. |
blue | Integer | The blue value in RGB notation. |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Backgrounds(color)
Sets a rectangular grid of background 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.setBackgrounds(colors);
পরামিতি
| নাম | আদর্শ | বিবরণ |
|---|---|---|
color | String[][] | A two-dimensional array of colors in CSS notation (such as '#ffffff' or 'white' ); null values reset the color. |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Border(top, left, bottom, right, vertical, horizontal)
Sets the border property. Valid values are true (on), false (off) and null (no change).
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 for border, false for none, null for no change. |
left | Boolean | true for border, false for none, null for no change. |
bottom | Boolean | true for border, false for none, null for no change. |
right | Boolean | true for border, false for none, null for no change. |
vertical | Boolean | true for internal vertical borders, false for none, null for no change. |
horizontal | Boolean | true for internal horizontal borders, false for none, null for no change. |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Border(top, left, bottom, right, vertical, horizontal, color, style)
Sets the border property with color and/or style. Valid values are true (on), false (off) and null (no change). For color, use Color in CSS notation (such as '#ffffff' or '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 for border, false for none, null for no change. |
left | Boolean | true for border, false for none, null for no change. |
bottom | Boolean | true for border, false for none, null for no change. |
right | Boolean | true for border, false for none, null for no change. |
vertical | Boolean | true for internal vertical borders, false for none, null for no change. |
horizontal | Boolean | true for internal horizontal borders, false for none, null for no change. |
color | String | A color in CSS notation (such as '#ffffff' or 'white' ), null for default color (black). |
style | Border Style | A style for the borders, null for default style (solid). |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Data Validation(rule)
Sets one data validation rule for all cells in the range.
// 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 | The data validation rule to set, or null to remove data validation. |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Data Validations(rules)
Sets the data validation rules for all cells in the range. This method takes a two-dimensional array of data validations, indexed by row then by column. The array dimensions must correspond to the range dimensions.
// 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[][] | A two-dimensional array of data validation rules to set; null values remove data validation. |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Font Color(color)
Sets the font color in CSS notation (such as '#ffffff' or 'white' ).
const ss = SpreadsheetApp.getActiveSpreadsheet(); const sheet = ss.getSheets()[0]; const cell = sheet.getRange('B2'); cell.setFontColor('red');
পরামিতি
| নাম | আদর্শ | বিবরণ |
|---|---|---|
color | String | The font color in CSS notation (such as '#ffffff' or 'white' ); a null value resets the color. |
প্রত্যাবর্তন
Range — This range, for chaining.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Font Color Object(color)
Sets the font color of the given range.
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Show Hyperlink(showHyperlink)
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
Throws
Error — when attempting to shift the depth of the first column when the control position is Group Control Toggle Position.BEFORE
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
Throws
Error — when attempting to shift the depth of the first row when the control position is Group Control Toggle Position.BEFORE
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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 |
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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. |
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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. |
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
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.
অনুমোদন
এই পদ্ধতি ব্যবহার করে এমন স্ক্রিপ্টগুলির জন্য নিম্নলিখিত এক বা একাধিক স্কোপের অনুমোদন প্রয়োজন:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets