Use Python script to extract data from excel sheet and input into website
<p>Hey I am python scripting novice, I was wondering if someone could help me understand how I could python, or any convenient scripting language, to cherry pick specific data values (just a few arbitrary columns on the excel sheet), and take the data and input into a web browser like chrome. Just a general idea of how this should function would be extremely helpful, and also if there is an API available that would be great to know.</p>

<p>Any advice is appreciated. Thanks.</p>

<p>Okay. Lets get started.</p>

<h2>Getting values out of an excel document</h2>

<p><a href="https://www.getdatajoy.com/learn/Read_and_Write_Excel_Tables_from_Python" rel="nofollow">This page</a> is a great place to start as far as reading excel values goes. </p>

<p>Directly from the site:</p>

<pre><code>import pandas as pd

table = pd.read_excel('sales.xlsx',
                  sheetname = 'Month 1',
                  header = 0,
                  index_col = 0,
                  parse_cols = "A, C, G",
                  convert_float = True)

print(table)
</code></pre>

<h2>Inputting values into browser</h2>

<p>Inputting values into the browser can be done quite easily through <a href="http://selenium-python.readthedocs.io/getting-started.html" rel="nofollow">Selenium</a> which is a python library for controlling browsers via code.</p>

<p>Also directly from the site:</p>

<pre><code>from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
</code></pre>

<h2>How to start your project</h2>

<p>Now that you have the building blocks, you can put them together. </p>

<p>Example steps:</p>

<ol>
<li>Open file, open browser and other initialization stuff you need to do.</li>
<li>Read values from excel document</li>
<li>Send values to browser</li>
<li>Repeat steps 2 &amp; 3 forever</li>
</ol>

python scripting