SSRS export to excel ignores default sheet direction

Osnat Osnat 21 Reputation points
2022-11-16T12:55:26.86+00:00

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
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,065 questions
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Anonymous
    2022-11-17T01:27:03.887+00:00

    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".
    261176-1.png
    Then run the report and it will display the columns of the table from right to left.
    Design:
    261177-2.png
    Run:
    261120-3.png
    Best regards,
    Aniya

    0 comments No comments

  2. 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.

    0 comments No comments

  3. 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.
    261265-4.jpg
    261271-5.jpg
    2 Select "All Commands" and find "Right-to-Left Documentation" and add it.
    261272-6.png
    3 After clicking OK, the command will appear in the toolbar, click it to change the direction of the worksheet.
    261189-7.png

    Best regards,
    Aniya

    0 comments No comments

  4. 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

    0 comments No comments

  5. 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".
    261762-2.png
    261657-3.png
    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

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.