Hi @Osnat Osnat
I think you can use "LayoutDirection" property. Select Tablix in the report, then find "LayoutDirection" in the Tablix property bar, and modify it to "RTL", which means "Right To Left".
Then run the report and it will display the columns of the table from right to left.
Design:
Run:
Best regards,
Aniya
SSRS export to excel ignores default sheet direction
When exporting the report to excel from SSRS I want the direction of the sheet to be Right To Left.
Even though that's the default definition in excel (Excel options>Advanced>Default direction), when exporting from SSRS it always show left to right,
but when I open excel directly it shows columns right to left correctly.
Hope there's a solution,
Thank you
SQL Server Reporting Services
6 answers
Sort by: Most helpful
-
Anonymous
2022-11-17T01:27:03.887+00:00 -
Osnat Osnat 21 Reputation points
2022-11-17T05:11:09.187+00:00 Hi, This property refers to the table only. exporting to excel doesn't change the sheet direction this way, only the order of the columns in the table.
-
Anonymous
2022-11-17T06:21:15.627+00:00 Hi @Osnat Osnat
I see what you mean now, you mean when you set the "Default direction" of the exported Excel report to "Right-to-Left", it doesn't work right? Based on my searching, this setting seems to only work on new sheets. You can use this method if you want to modify the orientation of an existing Excel worksheet.1 In the worksheet that opens, click Customize Quick Access Toolbar and click More Commands.
2 Select "All Commands" and find "Right-to-Left Documentation" and add it.
3 After clicking OK, the command will appear in the toolbar, click it to change the direction of the worksheet.
Best regards,
Aniya -
Osnat Osnat 21 Reputation points
2022-11-17T11:08:12.847+00:00 Hi Aniya,
Thanks for the fast reply!
My meaning was to open the excel from beginning in a "right to left" direction.
I already knew how to change it manually after it is opens, That's why I mentioned the default definition to emphasis that it's not opening correctly.
Regarding what you wrote about the setting seems to only work on new sheets only, a report exportation doesn't answer that definition?
I also fount out, that by exporting to CSV format, which opens excel as well, the excel opens according to default settings (Excel options>Advanced>Default direction) - with no problem at all.
So I don't get what's the difference...why does excel format ignores the setting, and CSV doesn't. Is there a way to change that? maybe from the server
Thanks again -
Anonymous
2022-11-18T05:53:48.853+00:00 Hi @Osnat Osnat
According to my understanding, when the report is exported to Excel, it is an existing Excel file, and the "Default direction" only applies to the new worksheet, if you want to change the existing worksheet, you need to change the "Display options for this worksheet".
When the report is exported as a CSV file, it uses the data rendering extension. The resulting file can be used to import raw report data into other file types such as Excel. This is equivalent to creating a new Excel worksheet and inserting the original data. So CSV files can use the default orientation (Right-To-Left) when opened with Excel.
If you want to achieve your needs, I suggest you export as a CSV file.
For more details, you can refer to this link: export-reports-report-builder-and-ssrs.
Best regards,
Aniya