Hi Team,
I have a scenario in which a Black Up Pointing Triangle has to be inserted in a cell of excel.
The code for Black Up Pointing Triangle is ▲.
Could you please share some sample java code to do the same.
Please find attached sample excel with a Black Up Pointing Triangle (inserted in B3 cell) for your reference.
Thanks in advance,
Sanjeev
Hi,
Thanks for your posting and using Aspose.Cells.
Java
//Create workbook
Workbook wb = new Workbook();
//Access first worksheet
Worksheet ws = wb.getWorksheets().get(0);
//Put your character in cell A1
ws.getCells().get(“A1”).putValue(“▲”);
//Save the workbook in xlsx format
wb.save(dirPath + “output.xlsx”);
Hi Team,
Thanks for the sample code.
<span style=“color: rgb(128, 0, 128); font-family: “Courier New”; font-size: small; background-color: rgb(255, 255, 255);”>ws.getCells().get(“A1”).putValue(“▲”);
<span style=“color: rgb(128, 0, 128); font-family: “Courier New”; font-size: small; background-color: rgb(255, 255, 255);”>
Is there any way of inserting the triangle symbol with code using some equivalent character/code rather than directly using the symbol as mentioned in the above line of code??
Thanks in advance,
Sanjeev
Hi,
I think you may change the line of code to:
e.g
Sample code:
…
//Put your character in cell A1
ws.getCells().get(“A1”).putValue("\u25B2");
…
Hope, this helps a bit.
Thank you.