When faced with this situation, there are two paths you can take. One option is to utilize the built-in menu, which I recently employed successfully on a demonstration from UIGrid. Alternatively, you can incorporate another module, such as ui.grid.exporter.
According to the documentation:
This module enables data exportation from the grid. The exported data may be saved in various formats and include all data, visible data, or selected rows with either all columns or only visible columns. No user interface is included; it's up to the caller to provide their own UI/buttons as needed, or activate the gridMenu.
In my experience, using the built-in gridMenu resulted in a file download named undefined without an extension. However, I was able to open it directly in LibreOffice Calc.
https://i.sstatic.net/4esLa.png
https://i.sstatic.net/IGtDY.png
https://i.sstatic.net/sy4ek.png
If precise control is paramount for your specific scenario, employing the exporter functionality is recommended. This allows for exporting grid data in csv or pdf format, covering all data, visible data, or selected data.
In order to export to Excel, ensure that you have installed the Excel-Builder module by executing: bower install excelbuilder.
Your inquiry lacks crucial details. Depending on the Excel version being used, users can adjust RTL or LTR options within the application itself. Implementing such adjustments programmatically will necessitate additional libraries or software tools. In the past, I engaged in significant Word and Excel programming utilizing Visual Basic.
The key takeaway is that more specifics are needed for your particular use case. Are you specifying the Excel version? Do you intend to programmatically modify the file? Is the file being transmitted elsewhere or downloaded by users for opening in Excel? These details will help tailor a more accurate solution.