Last active
September 17, 2019 12:48
-
-
Save Juarezroncalli/aae4da96a91b18b7f1b989522b06325a to your computer and use it in GitHub Desktop.
Novo Projeto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
# In[ ]: | |
import pyautogui | |
import webbrowser | |
import time | |
import os | |
import pyperclip | |
import pandas as pd | |
import numpy as np | |
import datetime | |
import locale | |
pd.read_excel('imob.xls', header=0, decimal=",") | |
df = pd.read_excel('imob.xls', header=0, decimal=",") #Converteu em dataframe | |
df['Conta Principal'] = df['Conta Principal'].values.astype(np.int64) | |
df['Conta Principal'] = df['Conta Principal'].values.astype(np.str) | |
df['Conta Depreciação'] = df['Conta Depreciação'].values.astype(np.int64) | |
df['Conta Depreciação'] = df['Conta Depreciação'].values.astype(np.str) | |
df['Taxa Depreciação'] = df['Taxa Depreciação'].values.astype(np.int64) | |
df['Taxa Depreciação'] = df['Taxa Depreciação'].values.astype(np.str) | |
df['Aquisição'] = df['Aquisição'].dt.strftime('%d%m%Y') #tirou / e formatou datas | |
#df['Valor Atual'] = df['Valor Atual'].astype("str", inplace=True) | |
df['Valor Atual'] = df['Valor Atual'].replace({'#': ''}, regex=True) | |
time.sleep(1) | |
# In[6]: | |
df | |
# In[11]: | |
#for index, row in df.iterrows(): | |
#conta = row.keys['Nome Fornecedor'] | |
#pyperclip.copy(conta) | |
# In[4]: | |
ECCO DO BRASIL INFORMATICA E ELETRONICOS | |
# In[5]: | |
#time.sleep(2) | |
#x, y = pyautogui.locateCenterOnScreen('bem.png') | |
#pyautogui.click(x,y) | |
time.sleep(2) | |
#pyautogui.typewrite('158') | |
#pyautogui.hotkey('enter') | |
pyautogui.hotkey('insert') | |
pyautogui.hotkey('tab') | |
for index, row in df.iterrows(): | |
row['Conta Principal'] | |
pyautogui.hotkey('ctrl','v') | |
#time.sleep(1) | |
pyautogui.hotkey('tab') | |
for index, row in df.iterrows(): | |
pyperclip.copy(row['Descrição']) | |
pyautogui.hotkey('ctrl','v') | |
time.sleep(1) | |
pyautogui.hotkey('tab') | |
pyautogui.hotkey('tab') | |
pyautogui.hotkey('tab') | |
pyautogui.hotkey('tab') | |
pyautogui.hotkey('tab') | |
pyautogui.hotkey('tab') | |
time.sleep(1) | |
pyautogui.hotkey('tab') | |
for index, row in df.iterrows(): | |
pyperclip.copy(row['Aquisição']) | |
pyautogui.hotkey('ctrl','v') | |
time.sleep(1) | |
pyautogui.hotkey('tab') | |
for index, row in df.iterrows(): | |
pyperclip.copy(row['Taxa Depreciação']) | |
pyautogui.hotkey('ctrl','v') | |
pyautogui.hotkey('tab') | |
for index, row in df.iterrows(): | |
pyperclip.copy(row['Valor Atual']) | |
pyautogui.press('apps') | |
pyautogui.press('down') | |
pyautogui.press('down') | |
pyautogui.press('down') | |
pyautogui.press('down') | |
pyautogui.press('enter') | |
pyautogui.press('enter') | |
for index, row in df.iterrows(): | |
pyperclip.copy(row['Conta Depreciação']) | |
pyautogui.hotkey('ctrl','v') | |
pyautogui.hotkey('tab') | |
x, y = pyautogui.locateCenterOnScreen('outros.png') | |
pyautogui.click(x,y) | |
x, y = pyautogui.locateCenterOnScreen('fornecedor.png') | |
pyautogui.click(x,y) | |
for index, row in df.iterrows(): | |
pyperclip.copy(row['Nome Fornecedor']) | |
pyautogui.hotkey('ctrl','v') | |
pyautogui.hotkey('tab') | |
for index, row in df.iterrows(): | |
pyperclip.copy(row['NF/Documento']) | |
pyautogui.hotkey('ctrl','v') | |
pyautogui.hotkey('tab') | |
x, y = pyautogui.locateCenterOnScreen('observacao.png') | |
pyautogui.click(x,y) | |
for index, row in df.iterrows(): | |
pyperclip.copy(row['Observação']) | |
pyautogui.hotkey('ctrl','v') | |
pyautogui.hotkey('tab') | |
pyautogui.hotkey('alt','g') | |
# In[ ]: | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment