I need the cells to automatically adjust their width and height based on the text, or I need a shortcut to do so. please find the attachment. could you please help on this.
image.png (8.7 KB)
Can you please specify which Aspose product you are using and provide more details about the context in which you want to adjust the cell dimensions based on the text?
yes. after typing text.
Do you need MS Excel like auto-fit feature to adjust columns’ width and rows’ height based on worksheet cells contents in Aspose.Cells.GridJs? Please elaborate and provide more details on it so we assist you accordingly or implement the feature into the APIs.
Hi Amjad,
Yes. I need MS Excel like auto-fit feature to adjust columns’ width and rows’ height based on worksheet cells contents in Aspose.Cells.GridJs
Hi Amjad,
Yes, you are correct. Based on the cell column values, the width needs to adjust automatically in the GridJS Excel editor, similar to Excel’s AutoFit option. Could you please guide us on how to achieve this functionality in the Excel editor on GridJS?
Thanks,
M.S. Sathish
We need to evaluate your requirements and we will provide assistance on acquiring it. We have opened the following new ticket(s) in our internal issue tracking system and will either provide code snippet to accomplish the task or deliver the supported version according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSGRIDJS-1486
Once we have an update on it, we will let you know.
@parthiveera
A workaround is you can use cells api before you import the workbook in GridJs. For example the below code will do autofit rows and columns for the first worksheet. See the document for your reference.
// Load the Excel file
Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook("autofit.xlsx");
foreach (Worksheet sheet in workbook.Worksheets)
{
// Auto fit the columns and rows
sheet.AutoFitRows();
sheet.AutoFitColumns();
}
//import in GridJS
GridJsWorkbook gwb=new GridJsWorkbook();
gwb.ImportExcelFile(workbook);
Can I do this in JavaScript? Can you share the code?
Regards,
Abdul.
We have already submitted a ticket (“CELLSGRIDJS-1486”) to address your requirements in Aspose.Cells.GridJs. Please allow us some time to implement the feature. It may take a while, but we will inform you once it is supported or there is an update on it.
any update on this issue? when i can expect patch for this?
We apologize, but your issue (Ticket ID: “CELLSGRIDJS-1486”) is still not resolved. It is a new feature/enhancement that may take some time to implement. We will inform you here as soon as we have any updates on it.