Aspose.Cells ile Excel Çalışma Kitabında İmza Satırı Oluşturma
Microsoft Excel, Excel çalışma kitaplarına İmza Satırı eklemek için bir özellik sağlar. Aspose.Cells de bu özelliği sağlar ve bunun için {0} özelliğini sunmuştur. Bu makale, bu özelliği kullanmanın nasıl olduğunu açıklar.
Aspose.Cells aynı özelliği sağlar ve bu amaçla Picture.setSignatureLine() özelliğini kullanmıştır. Bu makale, bu özelliği kullanmanın nasıl olduğunu açıklayacaktır.
Aspose.Cells kullanarak bir Excel çalışma kitabında İmza Satırı oluşturmak için Java kodu
Aşağıdaki örnek kod, bir İmza Satırı ekler ve çalışma kitabını kaydeder. Ekran görüntüsü, çıktı çalışma kitabının Microsoft Excel’de nasıl göründüğünü gösterir.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(CreateSignatureLine.class); | |
// Create workbook object | |
Workbook workbook = new Workbook(); | |
// Insert picture of your choice | |
int index = workbook.getWorksheets().get(0).getPictures().add(0, 0, "signature.jpg"); | |
// Access picture and add signature line inside it | |
Picture pic = workbook.getWorksheets().get(0).getPictures().get(index); | |
// Create signature line object | |
SignatureLine s = new SignatureLine(); | |
s.setSigner("Simon Zhao"); | |
s.setTitle("Development Lead"); | |
s.setEmail("Simon.Zhao@aspose.com"); | |
// Assign the signature line object to Picture.SignatureLine property | |
pic.setSignatureLine(s); | |
// Save the workbook | |
workbook.save(dataDir + "output.xlsx"); |