> For the complete documentation index, see [llms.txt](https://docs.mashmatrix.com/mashmatrix-sheet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mashmatrix.com/mashmatrix-sheet/ja/customization/using_sheet_component_in_visualforce.md).

# VisualforceページでのSheetの利用

作成したシートは任意のVisualforceページの中でVisualforceコンポーネントを利用して表示することが可能です。配置されたコンポーネントはVisualforceページからスクリプトを介して動作を制御することも可能です。

Visualforceページにシートを表示するコンポーネントを配置するには、以下の手順に従います。

1. Visualforceページを用意し、下記のようにして`msmxSheet:SheetView`コンポーネントを追加します。ブックIDおよびシートIDについては[「URLでのシートへのアクセス」](/mashmatrix-sheet/ja/customization/access_sheet_directly_with_url.md)を参考に指定します。

```
<apex:page>
  // ...
  <msmxSheet:SheetView
    id="(コンポーネントのID)"
    bookId="(ブックID)"
    sheetId="(シートID)"
    width="100%"
    height="400px"
  />
</apex:page>
```

`msmxSheet:SheetView`コンポーネントに指定可能な属性は以下のとおりです。

* **id** - 表示するコンポーネントのID
* **bookId** - 表示するシートを含むブックのID (必須)
* **sheetId** - 表示するシートのID。シートIDの値はシート設定から参照可能。指定されない場合はブックに含まれるシートが全てタブで表示される
* **recordId** - コンテキストとなるレコードのID。このID値がフィルタの「関連レコードID」として利用される
* **width** - コンポーネントの幅。ピクセルおよびパーセントでの指定が可能
* **height** - コンポーネントの高さ。ピクセルおよびパーセントでの指定が可能


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mashmatrix.com/mashmatrix-sheet/ja/customization/using_sheet_component_in_visualforce.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
