Class SpreadsheetLocker
Class SpreadsheetLocker
Locks file di spreadsheet
public class SpreadsheetLocker
Inheritance
I membri ereditari
- object.GetType() ,
- object.MemberwiseClone() ,
- object.ToString() ,
- object.Equals(object?) ,
- object.Equals(object?, object?) ,
- object.ReferenceEquals(object?, object?) ,
- object.GetHashCode()
Examples
[C#]
private class MyLockerSaveOptions : LockerSaveOptions
{
public override ProtectionSettings GetPasswordOfWorksheetProtection(SplitPartInfo info)
{
if (info.SheetName == "ToProtect")
{
ProtectionSettings ps = new ProtectionSettings();
ps.Password = "123456";
ps.ProtectionType = ProtectionType.All;
return ps;
}
return null;
}
}
SpreadsheetLocker processor = new SpreadsheetLocker();
LoadOptions loadOptions = new LoadOptions();
loadOptions.InputFile = "Template.xlsx";
MyLockerSaveOptions saveOptions = new MyLockerSaveOptions();
saveOptions.Password = "password to lock file";
saveOptions.OutputFile = "res_locked.xlsx";
SpreadsheetLocker.Process(loadOptions, saveOptions);
Methods
Process(LoadOptions, LockerSaveoptions)
.
public static void Process(LoadOptions loadOptions, LockerSaveOptions saveOptions)
Parameters
loadOptions
LoadOptions Opzioni per l’ingresso e il carico:saveOptions
LockerSaveOptions Opzioni per la produzione e il risparmio
Remarks
Il file ri-salvato dopo essere bloccato avrà sempre lo stesso formato con il file sorgente.
Il nome: Sheetize L’Assemblea dei Comuni: Sheetize.dll