We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Autofit column spreadsheet

Is there any function in spreadsheet to autofit column ?


if no, how to set width column spreadsheet by code not in element ?


Thanks in advance.


1 Reply

SP Sangeetha Priya Murugan Syncfusion Team March 20, 2023 09:31 AM UTC

Hi Geoff,


Query #1: Is there any function in spreadsheet to autofit column?


Yes, we have an option to perform autofit for columns in our spreadsheet. You can use autoFit method programmatically to achieve your requirement. For more details, please refer to the below link.


https://ej2.syncfusion.com/react/documentation/api/spreadsheet#autofit


Query #2: how to set width column spreadsheet by code not in element.


You can also use setColWidth or setColumnsWidth method to set width for columns programmatically. For more details, please refer to the below links.


https://ej2.syncfusion.com/react/documentation/api/spreadsheet#setcolwidth


https://ej2.syncfusion.com/react/documentation/api/spreadsheet#setcolumnswidth


Loader.
Up arrow icon