Spaces:
Sleeping
Sleeping
Update tools/excel_tool.py
Browse files- tools/excel_tool.py +6 -7
tools/excel_tool.py
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
import pandas as pd
|
2 |
|
3 |
-
def analyze_excel(
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
return f"{
|
9 |
-
return "0.00"
|
|
|
1 |
import pandas as pd
|
2 |
|
3 |
+
def analyze_excel(file_path: str) -> str:
|
4 |
+
try:
|
5 |
+
df = pd.read_excel(file_path)
|
6 |
+
return df.to_string(index=False)
|
7 |
+
except Exception as e:
|
8 |
+
return f"Error reading Excel file: {e}"
|
|