Use aspose. Cells to add an art watermark to a worksheet

Source: Internet
Author: User

You can use aspose. Cells to add special text effects to a workbook. For example, you can stretch the title, modify the text, make the text conform to the preset shape, or add a watermark effect to the workbook.

The following example shows how to use the Simple API provided by aspose. Cells to add watermarks to a worksheet.

ExampleCode:

C #

 
// Instantiate a new workbookworkbook workbook = new Workbook (); // get the first default sheetworksheet sheet = workbook. worksheets [0]; // Add watermarkaspose. cells. drawing. shape wordart = sheet. shapes. addtexteffect (msopresettexteffect. texteffect1, "confidential", "Arial black", 50, false, true, 18, 8, 1, 1,130,800); // get the Fill Format of the word artmsofillformat wordartformat = wordart. fillformat; // set the colorwordartformat. forecolor = system. drawing. color. red; // set the transparencywordartformat. transparency = 0.9; // make the line invisiblemsolineformat lineformat = wordart. lineformat; lineformat. isvisible = false; // Save the fileworkbook. save ("E: \ Test2 \ watermarkt_test.xls ");
 

[VB]

 
'Instantiate a new workbookdim workbook as new Workbook () 'get the first default sheetdim sheet as worksheet = workbook. worksheets (0) 'add watermarkdim wordart as aspose. cells. drawing. shape = sheet. shapes. addtexteffect (msopresettexteffect. texteffect1, "confidential", "Arial black", 50, false, true, 18, 8, 1, 1,130,800) 'Get the Fill Format of the word artdim wordartformat as msofillformat = wordart. fillformat 'set the colorwordartformat. forecolor = system. drawing. color. red'set the transparencywordartformat. transparency = 0.9 'make the line invisibledim lineformat as msolineformat = wordart. lineformatlineformat. isvisible = false 'Save the fileworkbook. save ("E: \ Test2 \ watermarkt_test.xls ")

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.