Generation

generate functionTue, 20 Jun 2023

exportar tablas pdf multipaginas a excel xlsx

# -*- coding: utf-8 -*- import os import sys import datetime import time import pandas as pd import tabula from tabula import read_pdf from tabula import options import glob path = "C:\\Users\\admin\\Documents\\etl\\tabula\\" def main(): print("--- inicio ---") nombre_archivo = "output.xlsx" nombre_archivo_output = "output.pdf" df = pd.DataFrame() writer = pd.ExcelWriter(os.path.join(path, nombre_archivo), engine='xlsxwriter') # se lee tabla 1 del pdf y se crea df df = read_pdf(os.path.join(path, nombre_archivo_output), pages=1, multiple_tables=False, output_format="dataframe") # se lee tabla 2 del pdf y se crea df df = read_pdf(os

Want to kickstart your project?Use the new AI Studio to create your code