excel codes tanghih

This commit is contained in:
hsafaei
2025-05-26 09:11:22 +03:30
parent b77a7fe703
commit cbb98723d8
10 changed files with 578 additions and 14 deletions
+24
View File
@@ -0,0 +1,24 @@
import pandas as pd
class ExcelHelper:
def __init__(self):
self.pd = null
self.data_dict = []
def load_data(self, file_path, sheet_name=0):
df = pd.read_excel(file_path, sheet_name=sheet_name)
return df
# def load_data(self, file_path, sheet_name):
# df = pd.read_excel(file_path, sheet_name=sheet_name)
# selected_columns = df[[self.fltxt_column_name]]
# self.data_dict = selected_columns.to_dict(orient='records')
# for record in self.data_dict:
# record['_id'] = " "
# print("✅ داده‌ها با موفقیت از فایل اکسل خوانده شدند.")