Power BIやSQL Server Reporting Services(SSRS)では、Excelレンダリング拡張機能を使用してページ化されたレポートをExcelにエクスポートできます。エクスポートされた列幅は、レポートの列幅を模倣しますが、データを再構成したり、ワークブック内で処理したりできます。記事では、エクスポートプロセスの制限やExcelの制約についても説明しています。たとえば、文字数や列幅の最大制限があり、テキストボックスのフォーマットはExcelの数式に変換されません。また、レポートに含まれる画像や図形の扱いにも制限があります。
Microsoft Excel レンダリング拡張機能の概要
適用対象
- Microsoft Report Builder (SSRS)
- Power BI Report Builder
- SQL Server Data Tools におけるレポートデザイナー
Microsoft Power BI や SQL Server Reporting Services (SSRS) を使用している場合、Excel レンダリング拡張機能を利用することでページネートされたレポートを Microsoft Excel にエクスポートできます。この機能により、エクスポートされた Excel の列の幅は、レポートでの列の幅に基づいて配置されます。ただし、レポートのデータを再構成したり、ワークブック内でさらに処理したりすることも可能です。
この記事では、エクスポートプロセスのさまざまな側面、インタラクティブ機能のレンダラーサポート、セル内データの配置制限について説明します。また、Excel 自体の制限やレンダラーの制約についても言及します。
エクスポート形式
Excel レンダリング拡張は、レポートを Office Open XML 形式でエクスポートします。このレンダラーが生成するファイルのコンテンツタイプは application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
であり、ファイル拡張子は .xlsx です。
デフォルトの設定を変更することもできます。これについての詳細は、Excel デバイス情報の設定 を参照してください。
レポートを Excel 形式でエクスポートする方法については、Report Builder のエクスポート手順 をご覧ください。
重要事項
レポートパラメータを String 型で定義する場合、ユーザーは任意の値を入力できるテキストボックスが表示されます。このパラメータがクエリパラメータに結び付けられておらず、パラメータ値がレポートに含まれている場合、セキュリティリスクがあります。具体的には、レポートユーザーは表現構文、スクリプトコード、URL などの悪意のある入力を行える可能性があります。これは、Excel にエクスポートされた場合、他のユーザーがその内容を閲覧することで、悪意のあるスクリプトを実行したり、悪意のあるサイトにリダイレクトされたりするリスクがあります。
悪意のあるスクリプトを誤って実行しないために、信頼できるソースからのみレンダリングされたレポートを開くことをお勧めします。レポートのセキュリティについては、レポートとリソースの保護 をご確認ください。
Excel の制限
Excel にエクスポートされたレポートには、以下の制限が適用されます。
- 最大列幅: 255 文字(1726.5 ポイント)。レンダラーはこの制限を確認しません。
- セル内の最大文字数: 32,767 文字。この制限を超えると、エラーメッセージが表示されます。
- 最大行高さ: 409 ポイント。行の内容がこの高さを超えると、Excel セルには409 ポイントまでの部分的なテキストが表示され、残りの内容はセル内に保持されます。
- 最大シート数: Excel での最大シート数は定義されていませんが、メモリやディスクの制約が制限を加える可能性があります。
さらに、Excel は最大で 7 レベルのネストを許可します。アウトラインの可用性は、レポート項目が他の項目の可視性を制御する位置に依存します。
Excel の制限についての詳細は、Excel の仕様と制限 を参照してください。
まとめ
Excel レンダリング拡張機能は、Microsoft Power BI や SSRS を使用しているユーザーにとって、非常に便利なツールです。エクスポートプロセスには、さまざまな機能や制限が備わっていますが、これを理解することで、さらに効果的にレポートを活用できるようになります。セキュリティや機能の制限を考慮しつつ、この機能を積極的に利用していきましょう。
————-
Export a paginated report to Microsoft Excel (Report Builder) – Microsoft Report Builder & Power BI Report Builder
Source link
The article discusses the Excel rendering extension available for Microsoft Report Builder, Power BI Report Builder, and SQL Server Reporting Services (SSRS), which allows users to export paginated reports into Excel format (.xlsx). It highlights how the exported columns and data mimic their layout in the original reports, enabling users to modify or further process the data in Excel.
Key points covered include:
-
Export Process and Support: The article details the renderer’s compatibility with interactive features, data placement in cells, and limitations associated with both Excel and the rendering process.
-
Export Format: Reports are exported in Office Open XML format, and users can modify certain default settings through device information settings.
-
Security Risks: It warns about security vulnerabilities associated with report parameters of type String, which could allow users to enter potentially malicious content.
-
Excel Limitations: Various constraints of Excel that affect exported reports are discussed, including maximum column width, character limits per cell, and handling of merged cells which may complicate sorting functions.
-
Text and Image Handling: The article explains how text and images are processed during export, noting specific limitations like the treatment of text box expressions and background images.
-
Interactivity: Details on how interactivity is handled in Excel, including outlines for collapsible items and limitations in implementing features like interactive sort or bookmarks.
-
Document Metadata: The renderer also writes metadata about the report such as creation date and author details into the Excel file.
- Troubleshooting Tips: It provides solutions for potential issues during the export process, particularly regarding permissions with execution accounts.
Overall, this article serves as a comprehensive guide on exporting reports to Excel from Microsoft reporting services, addressing the capabilities, limitations, and security considerations to be mindful of during the process.
コメント