[Solved] I have a full content in a column, can we make MCQ using excel GPT?

Hello Nazmul,

To automate the process of creating quizzes from the data in your Google Sheet. Follow the steps given below:
Place the necessary data in each row of your Google Sheet for a quiz question.
Setup Quiz.png

Now, in the Google Sheet, go to Extensions > Apps Script.
Use the following example code in the editor:
JavaScript:
function createGoogleFormQuiz() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1");
  var data = sheet.getDataRange().getValues();  // Get all data from the sheet
  
  // Create a new Google Form
  var form = FormApp.create('Automated Quiz');
  
  // Loop through each row in the sheet and add a question to the form
  for (var i = 1; i < data.length; i++) {
    var question = data[i][0];  // Question in the first column
    var option1 = data[i][1];   // Option 1 in the second column
    var option2 = data[i][2];   // Option 2 in the third column
    var option3 = data[i][3];   // Option 3 in the fourth column
    var option4 = data[i][4];   // Option 4 in the fifth column
    
    // Add a multiple-choice question to the form
    var item = form.addMultipleChoiceItem();
    item.setTitle(question)
        .setChoiceValues([option1, option2, option3, option4]);
  }
  
  Logger.log('Form URL: ' + form.getEditUrl());  // Log the form's URL
}

Run the createGoogleFormQuiz() function from the Apps Script editor
Now, open the URL to review or share the generated quiz.

Execute the code.png

Create Quiz Automatically
 

Online statistics

Members online
0
Guests online
3
Total visitors
3

Forum statistics

Threads
355
Messages
1,556
Members
662
Latest member
Pendyala Vignesh
Back
Top