Skip to content

Commit

Permalink
Refine table printing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
wdoppenberg committed Sep 3, 2024
1 parent 4cafbfb commit 96f74a1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ def main():
use_columns = args.column or None

if args.print_tables:
print(excel_file.table_names())
table_names = excel_file.table_names()
if len(table_names) > 0:
print(f"Available tables are {', '.join(table_names)}")
else:
print("No tables found")

for _ in range(args.iterations):
if args.table:
tbl = excel_file.load_table(args.table, header_row=0)
tbl = excel_file.load_table(args.table)
print(f"Found table {args.table}:")
print(tbl.to_polars())
else:
for sheet_name in excel_file.sheet_names:
Expand Down

0 comments on commit 96f74a1

Please sign in to comment.