Hi gofeatureus,
Your requirement can be achievable in our spreadsheet by iterating the row index and set the height by using setRowHeight method as like as below.
|
function updateCollection() { let range = spreadsheet.getActiveSheet().selectedRange; // to get the selected range let index = getRangeIndexes(range); // to get the index // for rows iteration for (let i = index[0]; i <= index[2]; i++) spreadsheet.setRowHeight(40, i, 0); }
|
For your convenience, we have prepared the sample based on our suggestion. In this we have updated the height for multiple rows in a button click event. Please find the link below.
Sample Link: https://stackblitz.com/edit/qnw5gc?file=index.ts,index.html
API Link: https://ej2.syncfusion.com/documentation/api/spreadsheet/#setrowheight
To set the height globally for all rows, please refer the below link.
Could you please check the above links and get back to us, if you need any further assistance on this.
Regards,
Sangeetha M
thanks sang
i'm not use for condition . need direct api, i pass range in args (height(A1:A1000))
Hi gofeatureus,
Currently we don’t have this option to provide the range like “A1:A1000” in our setRowHeight method. however, we will also do the same in our source level to update the height for multiple rows. So, we have created the custom method to update the height based on your need as like as below.
|
created: (): void => { customRowHeight(40, 'A1:A1000', 0); }, });
function customRowHeight(height, range, sheetIdx) { let index = getRangeIndexes(range); // to get the index // for rows iteration for (let i = index[0]; i <= index[2]; i++) spreadsheet.setRowHeight(height, i, sheetIdx); spreadsheet.resize(); }
|
For your convenience we have prepared the sample based on our suggestion. Please find the link below.
Sample Link: https://stackblitz.com/edit/qnw5gc-pn47fb?file=index.ts,index.html
Or else if you need to change the height of all rows in your sheet, you can achieve this in queryCellInfo event itself. For more details, please refer the below link.
Sample Link: https://stackblitz.com/edit/lbgncs
Could you please check the above links and get back to us, if you need any further assistance on this.
Regards,
Sangeetha M
Any feadback?
Hi gofeatureus,
Currently, we don’t have any plan to include this in our source level. So, only we have suggested to use our last provided workaround solution to achieve your requirement in our end. Please get back to us, if you need any further assistance on this.
Regards,
Sangeetha M
??????
Hi gofeatureus,
We considered this as improvement and the fix will be available in any of our Essential studio Volume 3 release. Which is scheduled to be rolled out on end of September 2022.we appreciate your patience until then. You can track the status of this improvement using below link from our feedback portal.
Feedback Portal Link: https://www.syncfusion.com/feedback/36902/provide-option-to-set-height-for-multiple-rows-using-api
Regards,
Sangeetha M
Hi gofeatureus,
As we have some other high priority customer promised improvements and bugs, we have planned to provide this fix in Volume 3 SP release. Which is scheduled to be rolled out in first week of November 2022. Until then, we suggest you to use our previously provided workaround solution to achieve your requirement. If we complete the fix prior, we will inform you until then we appreciate your patience until then.
Regards,
Sangeetha M
We are glad to announce that our Essential Studio 2022 Volume 3 SP release v20.3.0.56 is rolled out and is available for download under the following link.
Feedback Link: https://www.syncfusion.com/feedback/36902/provide-option-to-set-height-for-multiple-rows-using-api
Release notes link: https://ej2.syncfusion.com/documentation/release-notes/20.3.56/?type=all#spreadsheet
Sample Link: https://stackblitz.com/edit/kb6edr?file=index.ts
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
To change the row height of multiple rows, select the rows that you want to change, and then drag the boundary below one of the selected row headings. To change the row height for all rows on the worksheet, click the Select All button, and then drag the boundary below any row heading
Regards,
Will
Hi Will,
Currently, we don’t have this support (Resize multiple columns/rows at the UI level), so if you select multiple columns/rows and drag the boundary, the last column will only be resized based on our behavior. Therefore, we suggest using the setRowsHeight and setColumnsWidth methods to meet your needs.
https://ej2.syncfusion.com/documentation/api/spreadsheet/#setrowsheight
https://ej2.syncfusion.com/documentation/api/spreadsheet/#setcolumnswidth