We're sorry AsposeApp doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.app

Add watermark in Diagonal with RED FONT into xlsx file

I’m trying to do as i said in the title. Currently, my code adds the watermark into the file sheets, but it always comes in black and the text horizontal. How could i change my code to make the watermark red and also displayed in the left bottom -> right top diagonal?
My code currently is this:

Boolean aplicarMarcaDaguaXLS(String filePath, String outputFilePath, String text) {
	try {
		Workbook wb = new Workbook(filePath);
		Iterator it =  wb.getWorksheets().iterator();
		while(it.hasNext()) {
			Worksheet sheet = (Worksheet) it.next();
			Shape wordart = sheet.getShapes().addTextEffect(MsoPresetTextEffect.TEXT_EFFECT_1, text, "Arial Red", 50, false, true, 18, 8, 1, 1, 130, 800);
			FillFormat wordArtFormat = wordart.getFill();
			wordArtFormat.setOneColorGradient(Color.getRed(), 0.2, GradientStyleType.DIAGONAL_UP, 2);
			LineFormat lineFormat = wordart.getLine();
		return true;
	} catch (Exception e) {
		return false;

This topic has been moved to the related forum: https://forum.aspose.com/t/add-watermark-in-diagonal-with-red-font-into-xlsx-file/254781