feat: Add chartsheet warnings to error log for file processing
This commit is contained in:
parent
99758f524e
commit
ac58fbb15c
@ -374,7 +374,9 @@ if input_method == "Upload Files" and uploaded_files and st.button("Process File
|
||||
# Pass original filename to copy_excel_file
|
||||
chartsheet_warning = copy_excel_file(temp_input_path, temp_output_path, passwords, original_filename=uploaded_file.name)
|
||||
if chartsheet_warning:
|
||||
st.warning(f"⚠️ {chartsheet_warning} Please check the processed file against the original to ensure data was copied correctly.")
|
||||
warning_msg = f"⚠️ {chartsheet_warning} Please check the processed file against the original to ensure data was copied correctly."
|
||||
st.warning(warning_msg)
|
||||
st.session_state.error_log[uploaded_file.name] = warning_msg
|
||||
else: # Word
|
||||
remove_all_protection_tags(temp_input_path, temp_output_path)
|
||||
|
||||
@ -460,7 +462,9 @@ elif input_method == "Select Directory" and source_dir and dest_dir and st.butto
|
||||
if file_type == "Excel":
|
||||
chartsheet_warning = copy_excel_file(source_path, dest_path, passwords)
|
||||
if chartsheet_warning:
|
||||
st.warning(f"⚠️ {chartsheet_warning} Please check the processed file against the original to ensure data was copied correctly.")
|
||||
warning_msg = f"⚠️ {chartsheet_warning} Please check the processed file against the original to ensure data was copied correctly."
|
||||
st.warning(warning_msg)
|
||||
st.session_state.error_log[relative_path] = warning_msg
|
||||
else: # Word
|
||||
remove_all_protection_tags(source_path, dest_path)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user