Hi, still, the problem occurs in the sequence “Of Converting a 600-page PDF Table File to an Excel Table File (Execution Time Under 4 Minutes).” I have also attached the sequence flow and the script I am using. Any help will be great.
In The end, i was getting stuck on “Get Python Object” Activity
Hello @Haseeb_Farrukh , If yu need the log messages from the Pythonncode, then use “return” instead of “print”. NAd the the Get python object properties set as Object and Print the message using log messages like GetpyOutput.tostring.
import pandas as pd
import tabula
def extract_tables_to_excel(pdf_path, excel_path):
"""Extracts tables from PDF and saves them to Excel."""
try:
df = tabula.read_pdf(pdf_path, pages="all", multiple_tables=True) # Read all tables
with pd.ExcelWriter(excel_path) as writer:
df.to_excel(writer, sheet_name="Extracted Tables", index=False)
return "Extraction done successfully"
except Exception as e:
return f"Error extracting tables: {e}"