Redaction refers to the removal of unwanted or confidential information from electronic documents. All the file formats including PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX and others have some metadata properties. These properties include author name, category, company name, comments, creation time, last updated and many more. Sometimes you need to completely delete unwanted metadata fields or you might want to update their values. There are also some hidden data associated with the files which can be viewed using various tools and techniques. There are many cases when you don’t want this data to be accessed by anyone. With GroupDocs.Redaction API you can apply metadata redactions to any of these metadata properties. You can change or delete them by filtering the metadata you want. In this guide we will explain how you can redact author name from XLS metadata in Java.
Following code allows you to search and redact sensitive data from a XLS document. You can set scope for redaction by setting filter, e.g. to MetadataFilter.Author. It will leave the regular expressions matches undone in all metadata items, except “Author” property:
You can replace all or specific metadata in the document with empty (blank or minimal) values using EraseMetadataRedaction class. Following code shows how you can filter and then remove a metadata property from a XLS document.The example below blanks out all properties of the document:
final Redactor redactor = new Redactor(filePath); | |
try | |
{ | |
redactor.apply(new EraseMetadataRedaction(MetadataFilters.All)); | |
SaveOptions options = new SaveOptions(); | |
options.setAddSuffix(true); | |
options.setRasterizeToPDF(false); | |
// Save the document to "*_Redacted.*" file in original format | |
redactor.save(options); | |
} | |
finally { redactor.close(); } |
GroupDocs.Redaction for Java APIs are supported on all major platforms and operating systems. For complete system requirements guide, please visit system requirements Before executing the code below, please make sure that you have the following prerequisites installled on your system:
Files with XLS extension represent Excel Binary File Format. Such files can be created by Microsoft Excel as well as other similar spreadsheet programs such as OpenOffice Calc or Apple Numbers. File saved by Excel is known as Workbook where each workbook can have one or more worksheets. Data is stored and displayed to users in table format in worksheet and can span numeric values, text data, formulas, external data connections, images, and charts. Applications like Microsoft Excel lets you export workbook data to several different formats including PDF, CSV, XLSX, TXT, HTML, XPS, and several others. The XLS file format was replaced with a more open and structured format, XLSX, with the release of Microsoft Excel 2007. The latest versions still provide support for creating and reading XLS files, though XLSX is the first choice of use now.
Read More(Bitmap Image File)
(Microsoft Word Binary Format)
(Microsoft Word 2007 Marco File)
(Office 2007+ Word Document)
(Microsoft Word Template Files)
(Microsoft Word 2007+ Template File)
(Microsoft Word Template File )
(Graphical Interchange Format)
(Joint Photographic Expert Group Image)
(Portable Document Format)
(Portable Network Graphic)
(Microsoft PowerPoint Template Files)
(Microsoft PowerPoint Template File)
(PowerPoint Slide Show)
(Macro-enabled Slide Show)
(PowerPoint Slide Show)
(Microsoft PowerPoint 97-2003)
(Macro-enabled Presentation File)
(Open XML presentation Format)
(Rich Text Format)
(Tagged Image File Format)
(Macro-enabled Spreadsheet)
(Open XML Workbook)
(Excel 97 - 2003 Template)
(Excel Macro-Enabled Template)
(Excel Template)