Class ConditionalFormatRuleBuilder

শর্তসাপেক্ষ ফরম্যাট নিয়ম নির্মাতা

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

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain a number between 1 and 10.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenNumberBetween(1, 10)
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

পদ্ধতি

পদ্ধতি রিটার্ন টাইপ সংক্ষিপ্ত বিবরণ
build() Conditional Format Rule বিল্ডারে প্রয়োগ করা সেটিংস থেকে একটি শর্তসাপেক্ষ ফরম্যাট নিয়ম তৈরি করে।
copy() Conditional Format Rule Builder এই নিয়মের সেটিংস সহ একটি নিয়ম নির্মাতা প্রিসেট ফেরত দেয়।
get Boolean Condition() Boolean Condition |null যদি এই নিয়মটি বুলিয়ান শর্তের মানদণ্ড ব্যবহার করে, তাহলে নিয়মটির Boolean Condition তথ্য পুনরুদ্ধার করে।
get Gradient Condition() Gradient Condition |null যদি এই নিয়মটি Gradient Condition তথ্য পুনরুদ্ধার করে।
get Ranges() Range[] এই শর্তসাপেক্ষ ফরম্যাট নিয়মটি যে পরিসরগুলিতে প্রয়োগ করা হয়, তা পুনরুদ্ধার করে।
set Background(color) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য ব্যাকগ্রাউন্ড কালার নির্ধারণ করে।
set Background Object(color) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য ব্যাকগ্রাউন্ড কালার নির্ধারণ করে।
set Bold(bold) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য টেক্সট বোল্ড করে।
set Font Color(color) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য ফন্টের রঙ নির্ধারণ করে।
set Font Color Object(color) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য ফন্টের রঙ নির্ধারণ করে।
set Gradient Maxpoint(color) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট ম্যাক্সপয়েন্ট মানটি মুছে দেয় এবং এর পরিবর্তে রুলটির রেঞ্জগুলোর মধ্যে থাকা সর্বোচ্চ মানটি ব্যবহার করে।
set Gradient Maxpoint Object(color) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট ম্যাক্সপয়েন্ট মানটি মুছে দেয় এবং এর পরিবর্তে রুলটির রেঞ্জগুলোর মধ্যে থাকা সর্বোচ্চ মানটি ব্যবহার করে।
set Gradient Maxpoint Object With Value(color, type, value) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট ম্যাক্সপয়েন্ট ফিল্ডগুলো সেট করে।
set Gradient Maxpoint With Value(color, type, value) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট ম্যাক্সপয়েন্ট ফিল্ডগুলো সেট করে।
set Gradient Midpoint Object With Value(color, type, value) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট মিডপয়েন্ট ফিল্ডগুলো সেট করে।
set Gradient Midpoint With Value(color, type, value) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট মিডপয়েন্ট ফিল্ডগুলো সেট করে।
set Gradient Minpoint(color) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট মিনপয়েন্ট মানটি মুছে দেয় এবং এর পরিবর্তে রুলটির রেঞ্জগুলোর মধ্যে থাকা সর্বনিম্ন মানটি ব্যবহার করে।
set Gradient Minpoint Object(color) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট মিনপয়েন্ট মানটি মুছে দেয় এবং এর পরিবর্তে রুলটির রেঞ্জগুলোর মধ্যে থাকা সর্বনিম্ন মানটি ব্যবহার করে।
set Gradient Minpoint Object With Value(color, type, value) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট মিনপয়েন্ট ফিল্ডগুলো সেট করে।
set Gradient Minpoint With Value(color, type, value) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট মিনপয়েন্ট ফিল্ডগুলো সেট করে।
set Italic(italic) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য টেক্সটকে ইটালিক করে।
set Ranges(ranges) Conditional Format Rule Builder এক বা একাধিক পরিসর নির্ধারণ করে, যেগুলোর ওপর এই শর্তসাপেক্ষ ফরম্যাট নিয়মটি প্রয়োগ করা হবে।
set Strikethrough(strikethrough) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য টেক্সট স্ট্রাইকথ্রু সেট করে।
set Underline(underline) Conditional Format Rule Builder কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য টেক্সট আন্ডারলাইনিং সেট করে।
when Cell Empty() Conditional Format Rule Builder সেলটি খালি থাকলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Cell Not Empty() Conditional Format Rule Builder সেলটি খালি না থাকলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Date After(date) Conditional Format Rule Builder কোনো তারিখ প্রদত্ত মানের পরে হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Date After(date) Conditional Format Rule Builder কোনো তারিখ প্রদত্ত আপেক্ষিক তারিখের পরে হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Date Before(date) Conditional Format Rule Builder প্রদত্ত তারিখের আগের কোনো তারিখের ক্ষেত্রে শর্তসাপেক্ষ ফরম্যাট নিয়মটি কার্যকর করার জন্য সেট করে।
when Date Before(date) Conditional Format Rule Builder কোনো তারিখ প্রদত্ত আপেক্ষিক তারিখের আগে হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Date Equal To(date) Conditional Format Rule Builder কোনো তারিখ প্রদত্ত তারিখের সমান হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Date Equal To(date) Conditional Format Rule Builder কোনো তারিখ প্রদত্ত আপেক্ষিক তারিখের সমান হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Formula Satisfied(formula) Conditional Format Rule Builder প্রদত্ত ফর্মুলাটি ' true হিসেবে মূল্যায়ন করা হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Number Between(start, end) Conditional Format Rule Builder যখন কোনো সংখ্যা দুটি নির্দিষ্ট মানের মধ্যবর্তী কোনো একটিতে পড়ে, তখন সক্রিয় হওয়ার জন্য শর্তসাপেক্ষ ফরম্যাট নিয়মটি সেট করে।
when Number Equal To(number) Conditional Format Rule Builder কোনো সংখ্যা প্রদত্ত মানের সমান হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Number Greater Than(number) Conditional Format Rule Builder কোনো সংখ্যা প্রদত্ত মানের চেয়ে বড় হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Number Greater Than Or Equal To(number) Conditional Format Rule Builder কোনো সংখ্যা প্রদত্ত মানের চেয়ে বড় বা সমান হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Number Less Than(number) Conditional Format Rule Builder প্রদত্ত মানের চেয়ে কম কোনো সংখ্যার ক্ষেত্রে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Number Less Than Or Equal To(number) Conditional Format Rule Builder প্রদত্ত মানের চেয়ে কম বা সমান কোনো সংখ্যা হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Number Not Between(start, end) Conditional Format Rule Builder যখন কোনো সংখ্যা দুটি নির্দিষ্ট মানের মধ্যবর্তী না হয় এবং ওই দুটি মানের কোনোটিই না হয়, তখন সক্রিয় হওয়ার জন্য শর্তসাপেক্ষ ফরম্যাট নিয়মটি সেট করে।
when Number Not Equal To(number) Conditional Format Rule Builder কোনো সংখ্যা প্রদত্ত মানের সমান না হলে, শর্তসাপেক্ষ ফরম্যাটের নিয়মটি সক্রিয় করার জন্য এটি সেট করে।
when Text Contains(text) Conditional Format Rule Builder ইনপুটে প্রদত্ত মানটি থাকলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Text Does Not Contain(text) Conditional Format Rule Builder ইনপুটে প্রদত্ত মানটি না থাকলে, শর্তসাপেক্ষ ফরম্যাটের নিয়মটি সক্রিয় করার জন্য এটি সেট করে।
when Text Ends With(text) Conditional Format Rule Builder ইনপুটটি প্রদত্ত মান দিয়ে শেষ হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Text Equal To(text) Conditional Format Rule Builder ইনপুট প্রদত্ত মানের সমান হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
when Text Starts With(text) Conditional Format Rule Builder ইনপুটটি প্রদত্ত মান দিয়ে শুরু হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।
with Criteria(criteria, args) Conditional Format Rule Builder Boolean Criteria মান দ্বারা সংজ্ঞায়িত মানদণ্ডের উপর ভিত্তি করে শর্তসাপেক্ষ ফরম্যাট নিয়মটি নির্ধারণ করে, যা সাধারণত একটি বিদ্যমান নিয়মের criteria এবং arguments থেকে নেওয়া হয়।

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

build()

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

ফেরত

ConditionalFormatRule — কন্ডিশনাল ফরম্যাট রুলের একটি উপস্থাপনা।


copy()

এই নিয়মের সেটিংস সহ একটি নিয়ম নির্মাতা প্রিসেট ফেরত দেয়।

ফেরত

ConditionalFormatRuleBuilder — এই নিয়মের সেটিংসের উপর ভিত্তি করে তৈরি একটি বিল্ডার।


getBooleanCondition()

যদি এই নিয়মটি বুলিয়ান শর্তের মানদণ্ড ব্যবহার করে, তবে এটি নিয়মটির BooleanCondition তথ্য পুনরুদ্ধার করে। অন্যথায় null রিটার্ন করে। বুলিয়ান শর্তগুলিতে ফন্টের ওজন, ফন্টের রঙ এবং পটভূমির রঙের মতো ফরম্যাটিং সেটিংস থাকে।

// Log the boolean criteria type of the first conditional format rules of a
// sheet.
const rule = SpreadsheetApp.getActiveSheet().getConditionalFormatRules()[0];
const booleanCondition = rule.getBooleanCondition();
if (booleanCondition != null) {
  Logger.log(booleanCondition.getCriteriaType());
}

ফেরত

BooleanCondition |null — বুলিয়ান কন্ডিশন অবজেক্ট, অথবা null যদি নিয়মটিতে কোনো বুলিয়ান কন্ডিশন ব্যবহার করা না হয়।


getGradientCondition()

যদি এই রুলটি গ্রেডিয়েন্ট কন্ডিশন ক্রাইটেরিয়া ব্যবহার করে, তবে এটি রুলটির GradientCondition তথ্য পুনরুদ্ধার করে। অন্যথায় null রিটার্ন করে।

// Log the gradient minimum color of the first conditional format rule of a
// sheet.
const rule = SpreadsheetApp.getActiveSheet().getConditionalFormatRules()[0];
const gradientCondition = rule.getGradientCondition();
if (gradientCondition != null) {
  // Assume the color has ColorType.RGB.
  Logger.log(gradientCondition.getMinColorObject().asRgbColor().asHexString());
}

ফেরত

GradientCondition |null — গ্রেডিয়েন্ট কন্ডিশন অবজেক্ট, অথবা null যদি নিয়মটিতে কোনো গ্রেডিয়েন্ট কন্ডিশন ব্যবহার করা না হয়।


getRanges()

এই শর্তসাপেক্ষ ফরম্যাট নিয়মটি যে পরিসরগুলিতে প্রয়োগ করা হয়, তা পুনরুদ্ধার করে।

// Log each range of the first conditional format rule of a sheet.
const rule = SpreadsheetApp.getActiveSheet().getConditionalFormatRules()[0];
const ranges = rule.getRanges();
for (let i = 0; i < ranges.length; i++) {
  Logger.log(ranges[i].getA1Notation());
}

ফেরত

Range[] — যে পরিসরগুলিতে এই শর্তসাপেক্ষ ফরম্যাট নিয়মটি প্রয়োগ করা হয়।


setBackground(color)

কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য ব্যাকগ্রাউন্ড কালার নির্ধারণ করে। null পাস করলে রুলটি থেকে ব্যাকগ্রাউন্ড কালার ফরম্যাট সেটিংটি মুছে যায়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their background color to red if the cell has text equal to "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextEqualTo('hello')
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color String কাঙ্ক্ষিত রঙ অথবা মুছে ফেলার জন্য null

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setBackgroundObject(color)

কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য ব্যাকগ্রাউন্ড কালার নির্ধারণ করে। null পাস করলে রুলটি থেকে ব্যাকগ্রাউন্ড কালার ফরম্যাট সেটিংটি মুছে যায়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their background color to theme background color if the cell has text
// equal to "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const color = SpreadsheetApp.newColor()
                  .setThemeColor(SpreadsheetApp.ThemeColorType.BACKGROUND)
                  .build();
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextEqualTo('hello')
                 .setBackground(color)
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color Color কাঙ্ক্ষিত রঙের অবজেক্ট অথবা পরিষ্কার করার জন্য null

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setBold(bold)

কন্ডিশনাল ফরম্যাট রুলের জন্য টেক্সট বোল্ড করার ব্যবস্থা করে। যদি bold ' এর মান true হয়, তাহলে শর্ত পূরণ হলে রুলটি টেক্সটকে বোল্ড করে; আর যদি false , তাহলে শর্ত পূরণ হলে রুলটি বিদ্যমান বোল্ড মুছে দেয়। null পাস করলে রুলটি থেকে বোল্ড ফরম্যাট সেটিংটি মুছে যায়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn their text bold if the cell has text equal to "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextEqualTo('hello')
                 .setBold(true)
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
bold Boolean ফরম্যাটের শর্ত পূরণ হলে লেখাটি বোল্ড করা হবে কি না; null এই সেটিংটি বাতিল করে দেয়।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setFontColor(color)

কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য ফন্টের রঙ নির্ধারণ করে। null পাস করলে রুলটি থেকে ফন্টের রঙের ফরম্যাট সেটিংটি মুছে যায়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their font color to red if the cell has text equal to "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextEqualTo('hello')
                 .setFontColor('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color String কাঙ্ক্ষিত রঙ অথবা মুছে ফেলার জন্য null

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setFontColorObject(color)

কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য ফন্টের রঙ নির্ধারণ করে। null পাস করলে রুলটি থেকে ফন্টের রঙের ফরম্যাট সেটিংটি মুছে যায়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their font color to theme text color if the cell has text equal to
// "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const color = SpreadsheetApp.newColor()
                  .setThemeColor(SpreadsheetApp.ThemeColorType.TEXT)
                  .build();
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextEqualTo('hello')
                 .setFontColor(color)
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color Color কাঙ্ক্ষিত রঙের অবজেক্ট অথবা পরিষ্কার করার জন্য null

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setGradientMaxpoint(color)

কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট ম্যাক্সপয়েন্ট ভ্যালুটি মুছে দেয় এবং এর পরিবর্তে রুলটির রেঞ্জগুলোর মধ্যে থাকা সর্বোচ্চ মানটি ব্যবহার করে। এছাড়াও, গ্রেডিয়েন্টের ম্যাক্সপয়েন্ট কালারটি ইনপুট কালারে সেট করে দেয়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their background color somewhere between white and red, based on their
// values in comparison to the ranges minimum and maximum values.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .setGradientMaxpoint('#FF0000')
                 .setGradientMinpoint('#FFFFFF')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color String সেট করার জন্য সর্বোচ্চ বিন্দুর রঙ।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setGradientMaxpointObject(color)

কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট ম্যাক্সপয়েন্ট ভ্যালুটি মুছে দেয় এবং এর পরিবর্তে রুলটির রেঞ্জগুলোর মধ্যে থাকা সর্বোচ্চ মানটি ব্যবহার করে। এছাড়াও, গ্রেডিয়েন্টের ম্যাক্সপয়েন্ট কালারটি ইনপুট কালারে সেট করে দেয়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their background color somewhere between theme text and background
// colors, based on their values in comparison to the ranges minimum and maximum
// values.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const textColor = SpreadsheetApp.newColor()
                      .setThemeColor(SpreadsheetApp.ThemeColorType.TEXT)
                      .build();
const backgroundColor =
    SpreadsheetApp.newColor()
        .setThemeColor(SpreadsheetApp.ThemeColorType.BACKGROUND)
        .build();
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .setGradientMaxpoint(textColor)
                 .setGradientMinpoint(backgroundColor)
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color Color সেট করার জন্য ম্যাক্সপয়েন্ট কালার অবজেক্ট।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setGradientMaxpointObjectWithValue(color, type, value)

কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট ম্যাক্সপয়েন্ট ফিল্ডগুলো সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their background color somewhere from theme accent 1, accent 2 to accent
// 3 colors, based on their values in comparison to the values 0, 50, and 100.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const color1 = SpreadsheetApp.newColor()
                   .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT1)
                   .build();
const color2 = SpreadsheetApp.newColor()
                   .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT2)
                   .build();
const color3 = SpreadsheetApp.newColor()
                   .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT3)
                   .build();
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .setGradientMaxpointWithValue(
                     color1,
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '100',
                     )
                 .setGradientMidpointWithValue(
                     color2,
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '50',
                     )
                 .setGradientMinpointWithValue(
                     color3,
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '0',
                     )
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color Color সেট করার জন্য সর্বোচ্চ বিন্দুর রঙ।
type Interpolation Type সেট করার জন্য ম্যাক্সপয়েন্ট ইন্টারপোলেশন টাইপ।
value String সেট করার জন্য সর্বোচ্চ পয়েন্টের মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setGradientMaxpointWithValue(color, type, value)

কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট ম্যাক্সপয়েন্ট ফিল্ডগুলো সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their background color somewhere from red green to blue, based on their
// values in comparison to the values 0, 50, and 100.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .setGradientMaxpointWithValue(
                     '#0000FF',
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '100',
                     )
                 .setGradientMidpointWithValue(
                     '#00FF00',
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '50',
                     )
                 .setGradientMinpointWithValue(
                     '#FF0000',
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '0',
                     )
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color String সেট করার জন্য সর্বোচ্চ বিন্দুর রঙ।
type Interpolation Type সেট করার জন্য ম্যাক্সপয়েন্ট ইন্টারপোলেশন টাইপ।
value String সেট করার জন্য সর্বোচ্চ পয়েন্টের মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setGradientMidpointObjectWithValue(color, type, value)

কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট মিডপয়েন্ট ফিল্ডগুলো সেট করে। যদি প্রদত্ত ইন্টারপোলেশন টাইপ null হয়, তাহলে সমস্ত মিডপয়েন্ট ফিল্ড মুছে দেয়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their background color somewhere from theme accent 1 to accent 2 to
// accent 3 colors, based on their values in comparison to the values 0, 50, and
// 100.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const color1 = SpreadsheetApp.newColor()
                   .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT1)
                   .build();
const color2 = SpreadsheetApp.newColor()
                   .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT2)
                   .build();
const color3 = SpreadsheetApp.newColor()
                   .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT3)
                   .build();
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .setGradientMaxpointWithValue(
                     color1,
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '100',
                     )
                 .setGradientMidpointWithValue(
                     color2,
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '50',
                     )
                 .setGradientMinpointWithValue(
                     color3,
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '0',
                     )
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color Color মধ্যবিন্দুর রঙ নির্ধারণ করতে হবে।
type Interpolation Type মধ্যবিন্দু ইন্টারপোলেশন টাইপ সেট করতে হবে, অথবা null দিয়ে ক্লিয়ার করতে হবে।
value String নির্ধারণ করার জন্য মধ্যবিন্দু মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setGradientMidpointWithValue(color, type, value)

কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট মিডপয়েন্ট ফিল্ডগুলো সেট করে। যদি প্রদত্ত ইন্টারপোলেশন টাইপ null হয়, তাহলে সমস্ত মিডপয়েন্ট ফিল্ড মুছে দেয়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their background color somewhere from red green to blue, based on their
// values in comparison to the values 0, 50, and 100.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .setGradientMaxpointWithValue(
                     '#0000FF',
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '100',
                     )
                 .setGradientMidpointWithValue(
                     '#00FF00',
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '50',
                     )
                 .setGradientMinpointWithValue(
                     '#FF0000',
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '0',
                     )
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color String মধ্যবিন্দুর রঙ নির্ধারণ করতে হবে।
type Interpolation Type মধ্যবিন্দু ইন্টারপোলেশন টাইপ সেট করতে হবে, অথবা null দিয়ে ক্লিয়ার করতে হবে।
value String নির্ধারণ করার জন্য মধ্যবিন্দু মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setGradientMinpoint(color)

কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট মিনপয়েন্ট ভ্যালু মুছে দেয় এবং এর পরিবর্তে রুলটির রেঞ্জগুলোর মধ্যে থাকা সর্বনিম্ন মানটি ব্যবহার করে। এছাড়াও, গ্রেডিয়েন্টের মিনপয়েন্ট কালারটি ইনপুট কালারে সেট করে দেয়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their background color somewhere between white and red, based on their
// values in comparison to the ranges minimum and maximum values.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .setGradientMaxpoint('#FF0000')
                 .setGradientMinpoint('#FFFFFF')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color String সেট করার জন্য মিনিমাম পয়েন্টের রঙ।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setGradientMinpointObject(color)

কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট মিনপয়েন্ট ভ্যালু মুছে দেয় এবং এর পরিবর্তে রুলটির রেঞ্জগুলোর মধ্যে থাকা সর্বনিম্ন মানটি ব্যবহার করে। এছাড়াও, গ্রেডিয়েন্টের মিনপয়েন্ট কালারটি ইনপুট কালারে সেট করে দেয়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their background color somewhere between theme text and background
// colors, based on their values in comparison to the ranges minimum and maximum
// values.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const textColor = SpreadsheetApp.newColor()
                      .setThemeColor(SpreadsheetApp.ThemeColorType.TEXT)
                      .build();
const backgroundColor =
    SpreadsheetApp.newColor()
        .setThemeColor(SpreadsheetApp.ThemeColorType.BACKGROUND)
        .build();
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .setGradientMaxpoint(textColor)
                 .setGradientMinpoint(backgroundColor)
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color Color সেট করার জন্য মিনপয়েন্ট কালার অবজেক্ট।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setGradientMinpointObjectWithValue(color, type, value)

কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট মিনপয়েন্ট ফিল্ডগুলো সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their background color somewhere from theme accent 1 to accent 2 to
// accent 3 colors, based on their values in comparison to the values 0, 50, and
// 100.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const color1 = SpreadsheetApp.newColor()
                   .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT1)
                   .build();
const color2 = SpreadsheetApp.newColor()
                   .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT2)
                   .build();
const color3 = SpreadsheetApp.newColor()
                   .setThemeColor(SpreadsheetApp.ThemeColorType.ACCENT3)
                   .build();
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .setGradientMaxpointWithValue(
                     color1,
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '100',
                     )
                 .setGradientMidpointWithValue(
                     color2,
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '50',
                     )
                 .setGradientMinpointWithValue(
                     color3,
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '0',
                     )
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color Color সেট করার জন্য মিনিমাম পয়েন্টের রঙ।
type Interpolation Type সেট করার জন্য মিনপয়েন্ট ইন্টারপোলেশন টাইপ।
value String নির্ধারণ করার জন্য সর্বনিম্ন মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setGradientMinpointWithValue(color, type, value)

কন্ডিশনাল ফরম্যাট রুলের গ্রেডিয়েন্ট মিনপয়েন্ট ফিল্ডগুলো সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// set their background color somewhere from red to green to blue, based on
// their values in comparison to the values 0, 50, and 100.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .setGradientMaxpointWithValue(
                     '#0000FF',
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '100',
                     )
                 .setGradientMidpointWithValue(
                     '#00FF00',
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '50',
                     )
                 .setGradientMinpointWithValue(
                     '#FF0000',
                     SpreadsheetApp.InterpolationType.NUMBER,
                     '0',
                     )
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
color String সেট করার জন্য মিনিমাম পয়েন্টের রঙ।
type Interpolation Type সেট করার জন্য মিনপয়েন্ট ইন্টারপোলেশন টাইপ।
value String নির্ধারণ করার জন্য সর্বনিম্ন মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setItalic(italic)

শর্তসাপেক্ষ ফরম্যাট নিয়মের জন্য টেক্সটের ইটালিক নির্ধারণ করে। যদি italic এর মান true হয়, তাহলে শর্ত পূরণ হলে নিয়মটি টেক্সটকে ইটালিক করে; আর যদি false , তাহলে শর্ত পূরণ হলে নিয়মটি বিদ্যমান ইটালিক রূপটি মুছে দেয়। null পাস করলে নিয়মটি থেকে ইটালিক ফরম্যাটের সেটিংটি মুছে যায়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn their text italic if the cell has text equal to "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextEqualTo('hello')
                 .setItalic(true)
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
italic Boolean ফরম্যাটের শর্ত পূরণ হলে লেখাটি ইটালিক করা হবে কি না; null এই সেটিংটি বাতিল করে দেয়।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setRanges(ranges)

এক বা একাধিক রেঞ্জ নির্ধারণ করে, যেগুলোর উপর এই শর্তসাপেক্ষ ফরম্যাট নিয়মটি প্রয়োগ করা হবে। এই প্রক্রিয়াটি বিদ্যমান যেকোনো রেঞ্জকে প্রতিস্থাপন করে। একটি খালি অ্যারে সেট করলে বিদ্যমান সমস্ত রেঞ্জ মুছে যায়। একটি নিয়মে অবশ্যই অন্তত একটি রেঞ্জ থাকতে হবে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3
// and range D4:F6 to turn red if they contain a number between 1 and 10.
const sheet = SpreadsheetApp.getActiveSheet();
const rangeOne = sheet.getRange('A1:B3');
const rangeTwo = sheet.getRange('D4:F6');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenNumberBetween(1, 10)
                 .setBackground('#FF0000')
                 .setRanges([rangeOne, rangeTwo])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
ranges Range[] যে পরিসরগুলিতে এই শর্তসাপেক্ষ ফরম্যাট নিয়মটি প্রয়োগ করা হয়।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setStrikethrough(strikethrough)

কন্ডিশনাল ফরম্যাট রুলের ফরম্যাটের জন্য টেক্সট স্ট্রাইকথ্রু নির্ধারণ করে। যদি strikethrough এর মান true হয়, তাহলে শর্ত পূরণ হলে রুলটি টেক্সট স্ট্রাইকথ্রু করে দেয়; আর যদি false , তাহলে শর্ত পূরণ হলে রুলটি বিদ্যমান যেকোনো স্ট্রাইকথ্রু ফরম্যাটিং মুছে ফেলে। null পাস করলে রুলটি থেকে স্ট্রাইকথ্রু ফরম্যাট সেটিংটি মুছে যায়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// strikethrough their text if the cell has text equal to "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextEqualTo('hello')
                 .setStrikethrough(true)
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
strikethrough Boolean ফরম্যাটের শর্ত পূরণ হলে লেখাটি কেটে দেওয়া হবে কি না; null এই সেটিংটি বাতিল করে দেয়।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


setUnderline(underline)

কন্ডিশনাল ফরম্যাট রুলের জন্য টেক্সট আন্ডারলাইনিং সেট করে। যদি underline true হয়, তাহলে শর্ত পূরণ হলে রুলটি টেক্সটের নিচে আন্ডারলাইন যোগ করে; আর যদি false , তাহলে শর্ত পূরণ হলে রুলটি বিদ্যমান যেকোনো আন্ডারলাইন মুছে দেয়। null পাস করলে রুলটি থেকে আন্ডারলাইন ফরম্যাট সেটিংটি মুছে যায়।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// underline their text if the cell has text equal to "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextEqualTo('hello')
                 .setUnderline(true)
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
underline Boolean ফরম্যাটের শর্ত পূরণ হলে টেক্সটের নিচে দাগ দেওয়া হবে কি না; null এই সেটিংটি বাতিল হয়ে যায়।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenCellEmpty()

সেলটি খালি থাকলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they are empty.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenCellEmpty()
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenCellNotEmpty()

সেলটি খালি না থাকলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they are not empty.
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenCellNotEmpty()
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenDateAfter(date)

কোনো তারিখ প্রদত্ত মানের পরে হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain a date after 11/4/1993.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenDateAfter(new Date('11/4/1993'))
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
date Date সর্বশেষ তারিখ।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenDateAfter(date)

কোনো তারিখ প্রদত্ত আপেক্ষিক তারিখের পরে হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain a date after today.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenDateAfter(SpreadsheetApp.RelativeDate.TODAY)
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
date Relative Date নির্বাচিত তারিখের ধরণ অনুযায়ী সর্বশেষ তারিখ।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenDateBefore(date)

প্রদত্ত তারিখের আগের কোনো তারিখের ক্ষেত্রে শর্তসাপেক্ষ ফরম্যাট নিয়মটি কার্যকর করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain a date before 11/4/1993.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenDateBefore(new Date('11/4/1993'))
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
date Date সর্বপ্রথম অগ্রহণযোগ্য তারিখ।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenDateBefore(date)

কোনো তারিখ প্রদত্ত আপেক্ষিক তারিখের আগে হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain a date before today.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenDateBefore(SpreadsheetApp.RelativeDate.TODAY)
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
date Relative Date নির্বাচিত তারিখের ধরণ অনুযায়ী সর্বশেষ তারিখ।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenDateEqualTo(date)

কোনো তারিখ প্রদত্ত তারিখের সমান হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain the date 11/4/1993.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenDateEqualTo(new Date('11/4/1993'))
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
date Date একমাত্র গ্রহণযোগ্য তারিখ।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenDateEqualTo(date)

কোনো তারিখ প্রদত্ত আপেক্ষিক তারিখের সমান হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain todays date.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenDateEqualTo(SpreadsheetApp.RelativeDate.TODAY)
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
date Relative Date নির্বাচিত তারিখের ধরণ অনুযায়ী সর্বশেষ তারিখ।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenFormulaSatisfied(formula)

প্রদত্ত ফর্মুলাটি ' true হিসেবে মূল্যায়ন করা হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they satisfy the condition "=EQ(B4, C3)".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenFormulaSatisfied('=EQ(B4, C3)')
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
formula String একটি কাস্টম ফর্মুলা যা ইনপুট বৈধ হলে true হিসেবে বিবেচিত হয়।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenNumberBetween(start, end)

যখন কোনো সংখ্যা দুটি নির্দিষ্ট মানের মধ্যবর্তী কোনো একটিতে পড়ে, তখন সক্রিয় হওয়ার জন্য শর্তসাপেক্ষ ফরম্যাট নিয়মটি সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain a number between 1 and 10.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenNumberBetween(1, 10)
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
start Number সর্বনিম্ন গ্রহণযোগ্য মান।
end Number সর্বোচ্চ গ্রহণযোগ্য মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenNumberEqualTo(number)

কোনো সংখ্যা প্রদত্ত মানের সমান হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain the number 10.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenNumberEqualTo(10)
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
number Number একমাত্র গ্রহণযোগ্য মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenNumberGreaterThan(number)

কোনো সংখ্যা প্রদত্ত মানের চেয়ে বড় হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain a number greater than 10.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenNumberGreaterThan(10)
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
number Number সর্বোচ্চ অগ্রহণযোগ্য মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenNumberGreaterThanOrEqualTo(number)

কোনো সংখ্যা প্রদত্ত মানের চেয়ে বড় বা সমান হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain a number greater than or equal to 10.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenNumberGreaterThanOrEqualTo(10)
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
number Number সর্বনিম্ন গ্রহণযোগ্য মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenNumberLessThan(number)

প্রদত্ত মানের চেয়ে কম কোনো সংখ্যার ক্ষেত্রে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain a number less than 10.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenNumberLessThan(10)
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
number Number সর্বনিম্ন অগ্রহণযোগ্য মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenNumberLessThanOrEqualTo(number)

প্রদত্ত মানের চেয়ে কম বা সমান কোনো সংখ্যা হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain a number less than or equal to 10.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenNumberLessThanOrEqualTo(10)
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
number Number সর্বোচ্চ গ্রহণযোগ্য মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenNumberNotBetween(start, end)

যখন কোনো সংখ্যা দুটি নির্দিষ্ট মানের মধ্যবর্তী না হয় এবং ওই দুটি মানের কোনোটিই না হয়, তখন সক্রিয় হওয়ার জন্য শর্তসাপেক্ষ ফরম্যাট নিয়মটি সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain a number not between 1 and 10.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenNumberNotBetween(1, 10)
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
start Number সর্বনিম্ন অগ্রহণযোগ্য মান।
end Number সর্বোচ্চ অগ্রহণযোগ্য মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenNumberNotEqualTo(number)

কোনো সংখ্যা প্রদত্ত মানের সমান না হলে, শর্তসাপেক্ষ ফরম্যাটের নিয়মটি সক্রিয় করার জন্য এটি সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they don't contain the number 10.

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenNumberNotEqualTo(10)
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
number Number একমাত্র অগ্রহণযোগ্য মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenTextContains(text)

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

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they contain the text "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextContains('hello')
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
text String যে মানটি ইনপুটে অবশ্যই থাকতে হবে।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenTextDoesNotContain(text)

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

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they don't contain the text "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextDoesNotContain('hello')
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
text String যে মানটি ইনপুটে থাকা যাবে না।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenTextEndsWith(text)

ইনপুটটি প্রদত্ত মান দিয়ে শেষ হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they end with the text "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextEndsWith('hello')
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
text String স্ট্রিংটির শেষের সাথে তুলনা করার জন্য টেক্সট।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenTextEqualTo(text)

ইনপুট প্রদত্ত মানের সমান হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they have text equal to "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextEqualTo('hello')
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
text String একমাত্র গ্রহণযোগ্য মান।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


whenTextStartsWith(text)

ইনপুটটি প্রদত্ত মান দিয়ে শুরু হলে শর্তসাপেক্ষ ফরম্যাট নিয়মটি সক্রিয় করার জন্য সেট করে।

// Adds a conditional format rule to a sheet that causes cells in range A1:B3 to
// turn red if they start with the text "hello".

const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange('A1:B3');
const rule = SpreadsheetApp.newConditionalFormatRule()
                 .whenTextStartsWith('hello')
                 .setBackground('#FF0000')
                 .setRanges([range])
                 .build();
const rules = sheet.getConditionalFormatRules();
rules.push(rule);
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
text String স্ট্রিং-এর শুরুর অংশের সাথে তুলনা করার জন্য টেক্সট।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।


withCriteria(criteria, args)

BooleanCriteria মান দ্বারা সংজ্ঞায়িত মানদণ্ডের উপর শর্তসাপেক্ষ ফরম্যাট নিয়মটি সেট করে, যা সাধারণত একটি বিদ্যমান নিয়মের criteria এবং arguments থেকে নেওয়া হয়।

// Adds a new conditional format rule that is a copy of the first active
// conditional format rule, except it instead sets its cells to have a black
// background color.

const sheet = SpreadsheetApp.getActiveSheet();
const rules = sheet.getConditionalFormatRules();
const booleanCondition = rules[0].getBooleanCondition();
if (booleanCondition != null) {
  const rule = SpreadsheetApp.newConditionalFormatRule()
                   .withCriteria(
                       booleanCondition.getCriteriaType(),
                       booleanCondition.getCriteriaValues(),
                       )
                   .setBackground('#000000')
                   .setRanges(rules[0].getRanges())
                   .build();
  rules.push(rule);
}
sheet.setConditionalFormatRules(rules);

প্যারামিটার

নাম প্রকার বর্ণনা
criteria Boolean Criteria শর্তসাপেক্ষ ফরম্যাট মানদণ্ডের প্রকারভেদ।
args Object[] ক্রাইটেরিয়ার ধরনের জন্য উপযুক্ত আর্গুমেন্টের একটি অ্যারে; আর্গুমেন্টের সংখ্যা এবং তাদের ধরন উপরের সংশ্লিষ্ট when...() মেথডের সাথে মেলে।

ফেরত

ConditionalFormatRuleBuilder — এটি হলো চেইনিং-এর জন্য ব্যবহৃত বিল্ডার।