GroupDocs.Redaction lets your Python via .NET projects remove unwanted file data fast.
- Create a Redactor instance and load your Xlsx file.
- Choose the metadata entries you want to erase.
- Run redaction to clear those entries.
- Save the updated file.
GroupDocs.Redaction lets your Python via .NET projects remove unwanted file data fast.
import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr
# Delete hidden metadata in your XLSX document
# Set which metadata fields should be removed
redaction = grr.EraseMetadataRedaction(grr.MetadataFilters.ALL)
# Open the file using Redactor
with gr.Redactor("input.xslx") as redactor:
# Apply changes and save the file
result = redactor.apply(redaction)
redactor.save()
GroupDocs.Redaction for Python via .NET lets you clean up private info from multiple file formats. Keep your content ready to share.
Find and remove names, emails, or other private details from documents.
Place overlays to hide areas in images that should not be seen.
Remove hidden fields like Author, Title, or creation date.
import groupdocs.redaction as gr
import groupdocs.redaction.options as gro
import groupdocs.redaction.redactions as grr
import groupdocs.pydrawing as grd
# Mark the Author field for deletion
redaction_author = grr.MetadataSearchRedaction("[A-Za-z0-9 ]+", "GroupDocs Company")
redaction_author.filter = grr.MetadataFilters.AUTHOR
# Mark the Title field for deletion
redaction_title = grr.MetadataSearchRedaction(@"[A-Za-z0-9 ]+", "GroupDocs.Redaction Usage")
redaction_title.filter = grr.MetadataFilters.TITLE
# Open the document
with gr.Redactor("source.xslx") as redactor:
# Run redaction rules
redactions = [
redaction_author,
redaction_title
]
result = redactor.apply(redactions)
# Save the clean file
save_options = gro.SaveOptions()
save_options.add_suffix = True
save_options.rasterize_to_pdf = False
result_path = redactor.save(save_options)
Download GroupDocs.Redaction for free or get a trial license for full access!
Explore documentation, code samples, and community support to enhance your experience.
Use Python to clear private metadata in your XLSX files. A good way to make files ready for sharing or publishing.