From e9a7722915aefafd58d9077a8b6536c6150ce495 Mon Sep 17 00:00:00 2001 From: "devendra.parihar" Date: Tue, 1 Oct 2024 22:11:17 +0530 Subject: [PATCH] new: added ExcelParser(tested) to read .xlsx files --- test.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index 59d75188..00000000 --- a/test.py +++ /dev/null @@ -1,25 +0,0 @@ -from pathlib import Path -from application.parser.file.tabular_parser import ExcelParser,PandasCSVParser - -# Define the path to the .xlsx file -file_path = Path("/home/dev523/DocsGPT/Ledgers in Default Template.xlsx") -parser = ExcelParser(concat_rows=True, pandas_config={}) - -# Initialize the ExcelParser -# file_path = Path("/home/dev523/DocsGPT/mlb_teams_2012.csv") -# parser = PandasCSVParser(concat_rows=True, pandas_config={}) - - - -# Initialize the parser configuration (this can be customized if needed) -parser.init_parser() - -# Check if the parser config is set (this is optional) -if parser.parser_config_set: - print("Parser config has been set.") - -# Parse the Excel file -parsed_data = parser.parse_file(file_path) -print(parsed_data) - -