Node.js ve C++ kullanarak Çalışma Kitabı Yapısını Korumaya veya Korumayı Kaldırmaya

MS Excel’de Çalışma Kitabı Yapısını Koruma ve Kaldırma

çalışma kitabı yapısını koruma ve kaldırma

  1. Tıklayın İncele > Çalışma Kitabını Koru.
  2. Şifre kutusuna bir şifre girin.
  3. Tamam‘ı seçin, şifreyi teyit etmek için tekrar girin, ardından tekrar Tamam‘ı seçin.

Aspose.Cells for Node.js via C++ kullanarak Çalışma Kitabı Yapısını Korumaya

Excel dosyalarının çalışma sayfasını korumak için sadece aşağıdaki basit kod satırlarına ihtiyaç vardır.

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "Book1.xlsx");
// Create a new file.
const workbook = new AsposeCells.Workbook();
// Protect workbook structure.
workbook.protect(AsposeCells.ProtectionType.Structure, "password");
// Save Excel file.
workbook.save(filePath);

Aspose.Cells for Node.js via C++ kullanarak Çalışma Kitabı Yapısının Korumasını Kaldırma

Aspose.Cells API ile çalışma kitabı yapısını korumak kolaydır.

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "Book1.xlsx");

// Open an Excel file which workbook structure is protected.
const workbook = new AsposeCells.Workbook(filePath);
// Unprotect workbook structure.
workbook.unprotect("password");
// Save Excel file.
workbook.save(filePath);