@sarathepiq
textbox.gif (870.5 KB)
you can open the below sample file which contains textbox shape.
textbox.7z (7.7 KB)
Can we reduce the size of the text box and can we apply the color for the textbox.
@sarathepiq
click mouse right button on the textbox,then you can see you can resize or move the position .
however currently we have not provide change text or background color menus in UI.
but we support highlight the text content via the highlight APIs
Is this available in grid js aspose cell python via dotnet .
@sarathepiq
Yes. It is available in Python via .net.
The UI features is same as we use the same client JS.
Only server-side implementations differ for Java, .NET, and Python via .net.
I am entering text into a cell and applying fill color to the cell in an .xlsx
file. Can I add new text on top of the filled color?
Note : Here we don’t want to uses any shapes and controls
We don’t want to use text box controls.
@sarathepiq
you want show extra text at the specific cell ?
For such a case. this text will be overlapping with the cell content.
can you show a snapshot,
We don’t quite understand your requirement.
If using ms excel,how will you do for such scenario,
show me the step one by one.
I attached a GIF. In the cell, I’m filling it with black color. Is there any way to write text on top of the black background ?
Note : Here we don’t want to uses any shapes and controls
We don’t want to use text box controls.
2025-07-08_07h06_25.gif (1.2 MB)
As shown in the attached GIF, I am able to fill the cell with black color. On top of that, I can add new text in white color.
I want to perform same thing in aspose cells with out shapes and controls.
redations.gif (705.1 KB)
@sarathepiq
when you apply the redaction.
here we can see it just set backgroundColor to black.
so we can record the origin cell text and cell font color and the cell backgroundColor.
after it set backgroundColor to black. we just set cell text to the wanted text and the font color to white. then it will show the white text .
later if you remove the redaction. you just restore the backgroundColor ,the cell text and the cell font color.
Here, we don’t want to modify the original file content — meaning we don’t want to remove or overwrite the original text.
@sarathepiq
when click the download button, just do the remove redaction. then the original text is restore back.
otherwise ,I have no idea how to achieve such effect.
Am I need to manually remove the redactions ? is there any option in aspose cells to remove the redactions?
@sarathepiq
you can implement it using the JS APIs.
Just wait ,we will give you the sample code soon.
Don’t we have any direct way for redactions and redaction reasons ?
@sarathepiq
you can run the highlight demos in github.
we have the highlight APIs ,but it effect is not same as your requirement. here we just set background color, we don’t change the font color.
@sarathepiq
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSGRIDJS-1766 Support set font color for highlight API
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@sarathepiq
using the latest v25.7 client js
You can use the code below to mimic the redaction effect:
//redaction test
const reditems = [];
function redaction(ri, ci, redactionFontColor, redactionBgColor, redactionText)
{
const cell = xs.sheet.data.getCell(ri, ci);
const reditem = {
ri,
ci
};
if (cell)
{
reditem.originText = cell.text;
const style = xs.sheet.data.getCellStyle(ri, ci);
reditem.originColor = style.color;
reditem.originBgColor = style.bgcolor;
} else
{
//empty cell
reditem.originText = '';
reditem.originColor = 'black';
reditem.originBgColor = 'white';
}
reditems.push(reditem);
//change to redaction
xs.sheet.data.setCellText(ri, ci, redactionText);
const range = {};
range.sri = ri;
range.eri = ri;
range.sci = ci;
range.eci = ci;
xs.sheet.data.setRangeAttr(range, 'bgcolor', redactionBgColor);
xs.sheet.data.setRangeAttr(range, 'color', redactionFontColor);
xs.reRender();
}
function removeAllRedAction()
{
reditems.forEach((item) =>
{
const {
ri,
ci,
originText,
originColor,
originBgColor
} = item;
const range = {};
range.sri = ri;
range.eri = ri;
range.sci = ci;
range.eci = ci;
// xs.sheet.data.deleteRange(range, 'all');
xs.sheet.data.setCellText(ri, ci, originText);
xs.sheet.data.setRangeAttr(range, 'bgcolor', originBgColor ?? 'white');
xs.sheet.data.setRangeAttr(range, 'color', originColor);
});
reditems.length = 0;
xs.reRender();
}
function mybeforeSave()
{
removeAllRedAction();
console.log('before save remove redaction and restore the cell text');
return true;
}
//set function call before click download happen
xs.setBeforeSaveFunction(mybeforeSave);