Aspose::Cells::Drawing::Picture::SetSignatureLine method
Contents
[
Hide
]Picture::SetSignatureLine method
Gets and sets the signature line.
void Aspose::Cells::Drawing::Picture::SetSignatureLine(const SignatureLine &value)
Examples
Aspose::Cells::Startup();
//Instantiating a Workbook object
Workbook workbook;
Worksheet worksheet = workbook.GetWorksheets().Get(0);
//Adding a picture at the location of a cell whose row and column indices are 1 in the worksheet. It is "B2" cell
int imgIndex = worksheet.GetPictures().Add(1, 1, u"example.jpeg");
//Get the inserted picture object
Picture pic = worksheet.GetPictures().Get(imgIndex);
// Create signature line object
SignatureLine s;
s.SetSigner(u"Simon Zhao");
s.SetTitle(u"Development Lead");
s.SetEmail(u"Simon.Zhao@aspose.com");
// Assign the signature line object to Picture.
pic.SetSignatureLine(s);
SignatureLine s2 = pic.GetSignatureLine();
if (s2.GetSigner() == s.GetSigner())
{
//do what you want
}
//Save the excel file.
workbook.Save(u"result.xlsx");
Aspose::Cells::Cleanup();
See Also
- Class Vector
- Class SignatureLine
- Class Picture
- Namespace Aspose::Cells::Drawing
- Library Aspose.Cells for C++