.NET コアアプリの C# と正規表現を使用して DOCM ファイルをサニタイズする

Office および OpenOffice のドキュメント、スプレッドシート、プレゼンテーション、および Windows、Linux、macOS 上の DOCM から機密情報を検索して削除します


.NET API のドキュメント テキストの秘匿化

メタデータの変更やコメントの削除機能を含む、PDF、Word、Excel、PowerPoint のドキュメントおよび画像からの機密情報や機密情報をサニタイズするための、形式に依存しない単一のインターフェイス。 GroupDocs.Redaction for .NET ツールを使用すると、機密情報を編集して編集した文書を PDF に保存し、すべてのページをラスター イメージに変換したり、文書を元の形式で保存してさらに編集したりできます。

C# 経由の正規表現を使用して DOCM からのテキストを秘匿化する

GroupDocs.Redaction を使用すると、.NET 開発者は正規表現の最大限の強度を使用して、いくつかの簡単な手順で DOCM ファイルを秘匿化できます。

  • Redactor クラスのインスタンスを作成し、DOCM ファイルをロードします
  • RegexRedaction クラスのインスタンスを作成して、テキストを検索して置換します
  • RegexRedaction のオブジェクトを使用して Redactor.Apply メソッドを呼び出す

リダクション API を使ってみる

コマンドラインから nuget install GroupDocs.Redaction としてインストールするか、Visual Studio のパッケージ マネージャー コンソールから Install-Package GroupDocs.Redaction を使用してインストールします。 あるいは、ダウンロード からオフライン MSI インストーラーまたは ZIP ファイル内の DLL を取得し、プロジェクト内で手動で参照します。

using (Redactor redactor = new Redactor(@"sample.docm"))
{
	redactor.Apply(new RegexRedaction("\\d{2}\\s*\\d{2}[^\\d]*\\d{6}", new ReplacementOptions(System.Drawing.Color.Blue)));
	redactor.Save();
}

DOCM Ja Live Demo

Checkout the free online demo for DOCM Ja.

No need to set up

No need to write any code

Just upload the source file

Get the download link

What is DOCM File Format?

DOCM files are Microsoft Word 2007 or higher generated documents with the ability to run macros. It is similar to DOCX file format but the ability to run macros makes it different from DOCX. Like DOCX, DOCM files can be store text, images, tables, shapes, charts and other contents.The capability to run macros make it easy to save time by executing the series of commands in the form of recorded actions for automatic completion of a task. DOCM files can be opened and edited in Microsoft Word 2007 and above.

Read More

Other Ja Options

CSV Ja

(Comma Seperated Values)

DOC Ja

(Microsoft Word Binary Format)

DOCX Ja

(Office 2007+ Word Document)

DOT Ja

(Microsoft Word Template Files)

DOTM Ja

(Microsoft Word 2007+ Template File)

DOTX Ja

(Microsoft Word Template File )

PDF Ja

(Portable Document Format)

POT Ja

(Microsoft PowerPoint Template Files)

POTM Ja

(Microsoft PowerPoint Template File)

PPS Ja

(PowerPoint Slide Show)

PPSM Ja

(Macro-enabled Slide Show)

PPSX Ja

(PowerPoint Slide Show)

PPT Ja

(Microsoft PowerPoint 97-2003)

PPTM Ja

(Macro-enabled Presentation File)

PPTX Ja

(Open XML presentation Format)

RTF Ja

(Rich Text Format)

XLS Ja

(Microsoft Excel Spreadsheet (Legacy))

XLSM Ja

(Macro-enabled Spreadsheet)

XLSX Ja

(Open XML Workbook)

XLT Ja

(Excel 97 - 2003 Template)

XLTM Ja

(Excel Macro-Enabled Template)

XLTX Ja

(Excel Template)

Back to top
 日本