dotenv adicionado e IA testando arquivo de planilha pra verificar estrutura de dados
This commit is contained in:
27
read_xlsx.py
Normal file
27
read_xlsx.py
Normal 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))
|
||||
Reference in New Issue
Block a user