Its works but with this script
function doGet() {
try {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheets = ss.getSheets();
let result = {};
sheets.forEach(sheet => {
result[sheet.getName()] = sheet.getDataRange().getValues();
});
return ContentService
.createTextOutput(JSON.stringify(result))
.setMimeType(ContentService.MimeType.JSON);
} catch (e) {
return ContentService
.createTextOutput(
JSON.stringify({ status: "error", message: e.toString() })
)
.setMimeType(ContentService.MimeType.JSON);
}
}
@Sagar_Thosre you need to deploy this in your google sheets

