
Security News
OpenClaw Skill Marketplace Emerges as Active Malware Vector
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.
DocumentTextExtractor
Advanced tools
Simple C# library for extracting text and metadata from .docx, .pptx, and .xlsx files
DocumentTextExtractor provides simple methods for extracting text and metadata from .docx, .pptx, and .xlsx files.
docx, pptx, xlsx, and pdfpptx, xlsxThis library has been tested on a limited set of documents. It is highly likely that documents exist this from which the library, in its current state, cannot extract text.
The PDF implementation relies upon PDFSharp and PDFPlumber. The latter is written in Python and requires that you have installed Python and used pip to install the pdfplumber package.
Refer to the Test project for a full example.
using DocumentTextExtractor;
void Main(string[] args)
{
using (DocxTextExtractor docx = new DocxTextExtractor("./temp/", "mydocument.docx"))
{
string docxText = docx.ExtractText();
Dictionary<string, string> docxMetadata = docx.ExtractMetadata();
}
using (PptxTextExtractor pptx = new PptxTextExtractor("./temp/", "mypresentation.pptx"))
{
string pptxText = pptx.ExtractText();
Dictionary<string, string> pptxMetadata = pptx.ExtractMetadata();
}
using (XlsxTextExtractor xlsx = new XlsxTextExtractor("./temp/", "myspreadsheet.xlsx"))
{
string xlsxText = xlsx.ExtractText();
Dictionary<string, string> xlsxMetadata = xlsx.ExtractMetadata();
}
using (PdfTextExtractor pdf = new PdfTextExtractor("myfile.pdf"))
{
string pdfText = pdf.ExtractText();
Dictionary<string, string> pdfMetadata = pdf.ExtractMetadata();
}
}
For certain document types (e.g. pptx and xlsx) text can be extracted with an identifier for the slide or sheet number associated with the document.
using (PptxTextExtractor pptx = new PptxTextExtractor("./temp/", "mypresentation.pptx"))
{
IEnumerable<KeyValuePair<int, string>> slideContent = pptx.ExtractTextBySlide();
foreach (KeyvaluePair<int, string> kvp in slideContent)
{
Console.WriteLine("Slide " + kvp.Key + ": " + kvp.Value);
}
}
using (XlsxTextExtractor xlsx = new XlsxTextExtractor("./temp/", "mypresentation.pptx"))
{
IEnumerable<KeyValuePair<int, string>> sheetContent = xlsx.ExtractTextBySheet();
foreach (KeyvaluePair<int, string> kvp in sheetContent)
{
Console.WriteLine("Sheet " + kvp.Key + ": " + kvp.Value);
}
}
Please refer to CHANGELOG.md.
FAQs
Simple C# library for extracting text and metadata from .docx, .pptx, and .xlsx files
We found that documenttextextractor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.