Below is the program on how to create a dynamic JSON file from reading data through an excel file as input for json in python. First, install openpyxl from the following command to read the data from an excel file in python pip install openpyxl import os import openpyxl import json # create a JSON file to write dynamic JSON data. f = open("C:\\Users\\My_Dyanamic_JSON_Test".json", "a") # Open excel file for input path = "C:\\Users\\Excel_input_File.xlsx" # create workbook object for excel file wb_obj = openpyxl.load_workbook(path) # create a workbook sheet object for the excel file sheet_obj = wb_obj["Sheet1"] # get the data from the workbook sheet object from an excel file Row1_cell1 = sheet_obj["A" + str(1)] Row1_cell2 = sheet_obj["B" + str(1)] Row1_cell3 = sheet_obj["C" + str(1)] Row1_cell4 = sheet_obj["D" + str(1)] Row1_cell5 = sheet_obj["E" + str(1)] Row1_cell6 = sheet_obj["F"...
Blog which contains C#, asp.net, asp.net MVC, Selenium webdriver with core java, Bootstrap, Jquery and many more