I am trying to create an HTML table from excel sheet and copy it to a webpage. I am using Send_Keys to send over 200000 characters (indifferent lines) to a webpage but it is causing memory issue and crashing jupyter. My code is as below. I am looking for ways to speed up the process to copy the variable x in my code on the webpage.
sheet_to_df_map = pd.read_excel(r'.xlsx', sheet_name='')
x = sheet_to_df_map.to_html()
x = str(x)
time.sleep(30)
button = driver.find_element_by_id("editPageLink")
button.click()
time.sleep(30)
driver.switch_to.frame(driver.find_element_by_id("wysiwygTextarea_ifr"))
button1 = driver.find_element_by_xpath("//body[@data-id='wysiwygTextarea']//p")
button1.click()
time.sleep (30)
button1.send_keys(x)