npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iimm/word-excel-unprotect

v0.0.1

Published

remove editting restrictions of the word or excel file. 移除Word/Excel文件的限制编辑

Readme

@iimm/word-excel-unprotect

NPM version NPM downloads

Description

一个简单的React组件,在纯浏览器环境中解除Word或Excel文件的编辑限制(如果设置了打开文件就需要输入密码则不可以)

a simple React component to unprotect Word or Excel files in pure browser environment. while if the password is required when a file is opened, it cannot be unprotected.

Preview

预览图

Install

# pnpm
$ pnpm add @iimm/word-excel-unprotect

# npm
$ npm i @iimm/word-excel-unprotect

# yarn
$ yarn add @iimm/word-excel-unprotect

Props

export let wordOrExcelUnprotectTranslations = {
  reset: {
    zh: "重置",
    en: "Reset",
  },
  unprotect: {
    zh: "解除限制",
    en: "Unprotect",
  },
  extentionCheckMsg: {
    zh: `不是支持的docx或xlsx文件格式,请另存为(直接修改扩展名无效)支持的格式:`,
    en: `Not a supported docx or xlsx file format, please save as (modifying the extension name directly is invalid) supported formats: `,
  },
  magicNumberCheckMsg: {
    zh: "文件魔数检查:不是有效的docx或xlsx文件",
    en: "File magic number check: not a valid docx or xlsx file",
  },
  xmlCheckMsg: {
    zh: "文件结构检查:不是有效的docx或xlsx文件",
    en: "File structure check: not a valid docx or xlsx file",
  },
  unknownErrorMsg: {
    zh: "未知错误",
    en: "Unknown error",
  },
  noEdittingRestrictionMsg: {
    zh: "原文件没有限制编辑",
    en: "The original file does not have any editing restrictions",
  },
};

interface WordOrExcelUnprotectProps {
    className?: string;
  /**
   * @default 'zh'
   */
  lang?: ("zh" | "en") & {};
  translations?: Record<keyof typeof wordOrExcelUnprotectTranslations, Record<string, string>>;
  /**
   * @default 'iimm-'
   */
  fileNamePrefix?: string;
}

Styles

.iimm-unprotect-container {
  width: 100%;
  padding: 5px;
}

.iimm-unprotect-input {
  padding: 5px;
}

.iimm-unprotect-error {
  color: red;
  font-weight: bold;
  margin-top: 5px;
  margin-bottom: 5px;
}

.iimm-unprotect-reset {
  margin-left: 5px;
  margin-right: 5px;
  background: transparent;
  border-color: #9254de;
  border-radius: 5px;
  min-width: 15px;
  min-height: 10px;
  color: #722ed1;
  cursor: pointer;
}

.iimm-unprotect-action {
  margin-left: 5px;
  margin-right: 5px;
  background: #1890ff;
  border-color: #1890ff;
  border-radius: 5px;
  min-width: 25px;
  min-height: 10px;
  color: white;
  cursor: pointer;
}

LICENSE

MIT