ArvindSelvaraj commited on
Commit
ecfd181
1 Parent(s): f11a545

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -22,7 +22,7 @@ if st.button("Generate Test Cases"):
22
 
23
  # Export test cases
24
  st.sidebar.title("Export Test Cases")
25
- format = st.sidebar.selectbox("Select Format", ["json", "csv"], key="export_format")
26
  if st.sidebar.button("Export Test Cases", key="export_button"):
27
  if 'test_cases' in st.session_state:
28
  test_cases = st.session_state.test_cases
@@ -32,6 +32,8 @@ if st.sidebar.button("Export Test Cases", key="export_button"):
32
  mime_type = "application/json"
33
  elif format == 'csv':
34
  mime_type = "text/csv"
 
 
35
  else:
36
  st.sidebar.error(f"Unsupported format: {format}")
37
  export_content = None
 
22
 
23
  # Export test cases
24
  st.sidebar.title("Export Test Cases")
25
+ format = st.sidebar.selectbox("Select Format", ["json", "csv", "excel"], key="export_format") # Added "excel" as an option
26
  if st.sidebar.button("Export Test Cases", key="export_button"):
27
  if 'test_cases' in st.session_state:
28
  test_cases = st.session_state.test_cases
 
32
  mime_type = "application/json"
33
  elif format == 'csv':
34
  mime_type = "text/csv"
35
+ elif format == 'excel':
36
+ mime_type = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
37
  else:
38
  st.sidebar.error(f"Unsupported format: {format}")
39
  export_content = None