New Style G-Sheet data fetch (Multiple)

BSNL Tariff Table
MRP Validity Per Day Data Calls SMS
Tips: Approach 1: Using Google Sheets Formulas You can use the QUERY function to combine data from Sheet1 and Sheet2. Here’s how you can do it: Open your Google Sheets document. In a new sheet (e.g., "CombinedData"), enter the following formula =QUERY({Sheet1!A1:C; Sheet2!A2:C}, "SELECT * WHERE Col1 IS NOT NULL", 1) This formula combines data from columns A to C of Sheet1 and Sheet2. Ensure that the ranges are correct, especially that Sheet2's range starts from row 2 if you want to skip the header. Approach 2: Using JavaScript (Fetch API) If you are fetching data using JavaScript, you can modify your existing script to include data from both sheets. Here’s an updated version of your script: Explanation of the JavaScript Code: SHEET_NAMES Array: The script fetches data from both Sheet1 and Sheet2 as specified in the SHEET_NAMES array. Data Fetching: For each sheet, it constructs the URL and fetches the data. Row Processing: It processes the rows, skipping the header, and only includes columns A to C. Appending Data: The selected data is appended to the tableBody in your HTML. full-width

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !