Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
590
Facing issue while align the cell value to center in Excel to export
posted

Hi

I want a small clarification on one of the use case related to Excel Library. (https://es.infragistics.com/products/ignite-ui-react/react/components/excel-library-using-worksheets)

I want to know how can I align the cell value to center

Hoping for a positive response.

Thanks!!!

Parents
No Data
Reply
  • 34810
    Verified Answer
    Offline posted

    Hello Shubham,

    When exporting, each of the WorksheetRow elements have a cells collection that return WorksheetCell objects. Those WorksheetCell objects have a cellFormat property that then exposes an alignment property that you can set to a HorizontalCellAlignment enum to control the alignment of the text within the cell. For example, where “cell” is a WorksheetCell:

    cell.cellFormat.alignment = HorizontalCellAlignment.Center;

    Please let me know if you have any other questions or concerns on this matter.

Children
No Data