GenerativeAIExamples icon indicating copy to clipboard operation
GenerativeAIExamples copied to clipboard

Add support for Excel file upload in data-analysis-agent

Open Himel-Tasrif opened this issue 5 months ago • 0 comments

Summary

This pull request adds support for uploading .xlsx Excel files in addition to .csv in the data-analysis-agent application.

Changes Made

  • Modified the st.file_uploader() line to accept both CSV and Excel files.
  • Added logic to determine file type and use either pd.read_csv() or pd.read_excel().
  • Added openpyxl to requirements.txt to support Excel parsing.

Why this is needed

Many data analysts work with Excel files as well as CSV. This enhancement makes the app more accessible and flexible for a broader audience.

Tested

  • Verified that both .csv and .xlsx files load properly.
  • Tested functionality locally with Streamlit.

Let me know if any adjustments or refinements are needed.

Himel-Tasrif avatar Jun 04 '25 18:06 Himel-Tasrif