Proteggere e Difendere la Struttura del Workbook
Contents
[
Hide
]
Per impedire ad altri utenti di visualizzare i fogli di lavoro nascosti, aggiungere, spostare, eliminare o nascondere fogli di lavoro e rinominare fogli di lavoro, è possibile proteggere la struttura del proprio foglio di lavoro di Excel con una password.
Proteggere e difendere la struttura del workbook in MS Excel
- Fare clic su Revisione > Proteggi Cartella di Lavoro.
- Inserire una password nella casella di Password.
- Selezionare OK, reinserire la password per confermarla e quindi selezionare di nuovo OK.
Proteggere la struttura del foglio di lavoro utilizzando Aspose.Cell per .Net
È sufficiente utilizzare le seguenti linee di codice per implementare la protezione della struttura della cartella di lavoro dei file di Excel.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create a new file. | |
Workbook workbook = new Workbook(); | |
//Protect workbook structure. | |
workbook.Protect(ProtectionType.Structure, "password"); | |
//Save Excel file. | |
workbook.Save("Book1.xlsx"); |
Sbloccare la struttura del foglio di lavoro utilizzando Aspose.Cell per .Net
Sbloccare la struttura del workbook è semplice con l’API Aspose.Cells.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Open an Excel file which workbook structure is protected. | |
Workbook workbook = new Workbook("Book1.xlsx"); | |
//Unprotect workbook structure. | |
workbook.Unprotect("password"); | |
//Save Excel file. | |
workbook.Save("Book1.xlsx"); |
Nota: è necessaria una password corretta.