dotenv adicionado e IA testando arquivo de planilha pra verificar estrutura de dados

This commit is contained in:
2026-03-29 01:31:02 -04:00
parent 4b79db4e1b
commit d156e91a6e
3 changed files with 105 additions and 0 deletions

27
read_xlsx.py Normal file
View File

@@ -0,0 +1,27 @@
import openpyxl
# Read Vendas
wb = openpyxl.load_workbook('FundoBiblicoVendasv2.xlsx')
ws = wb.active
print("=" * 80)
print(f"VENDAS - Sheet: {ws.title} | Rows: {ws.max_row} | Cols: {ws.max_column}")
print("=" * 80)
headers = [cell.value for cell in ws[1]]
print(f"Headers: {headers}")
print("-" * 80)
for row in ws.iter_rows(min_row=2, max_row=ws.max_row, values_only=True):
print(list(row))
print("\n\n")
# Read Lancamentos
wb2 = openpyxl.load_workbook('FundoBiblicoLancamentos.xlsx')
ws2 = wb2.active
print("=" * 80)
print(f"LANCAMENTOS - Sheet: {ws2.title} | Rows: {ws2.max_row} | Cols: {ws2.max_column}")
print("=" * 80)
headers2 = [cell.value for cell in ws2[1]]
print(f"Headers: {headers2}")
print("-" * 80)
for row in ws2.iter_rows(min_row=2, max_row=ws2.max_row, values_only=True):
print(list(row))