edit-office-files
v1.0.2
Published
search and replace text strings in docx, pptx, xlsx files.
Downloads
42
Maintainers
Readme
edit-office-files
search and replace text strings in docx, pptx, xlsx files.
Functionality same as aspose app
Current Features:
- Efficient search and replace operations within DOCX files.
Upcoming Features:
- Support for searching and replacing text in PPTX and XLSX files.
- Advanced search options (e.g., regular expressions, case-sensitive search).
Here is what you can achieve:
step1:
npm i edit-office-files
step2:
import {SearchAndReplace} from 'edit-office-files';
async function main() {
const searchTexts = ['Hello World', 'are You', 'coloured'];
const replacementTexts = ['REPLACEMENT1', 'REPLACEMENT2', 'REPLACEMENT3'];
const reader = new SearchAndReplace('assets/document.docx', searchTexts, replacementTexts, 'updated.docx');
await reader.process();
}
main();