GridDesktopでワークブックをローディングする際のフィルターオブジェクト
Contents
[
Hide
]
可能な使用シナリオ
GridDesktop.LoadDataFilterプロパティを使用してワークブックからデータをフィルタリングしてください。
GridLoadDataFilterOptions列挙型には、以下の値があります。
- 全て
- ブック設定
- 空白セル
- ブールセル
- データセル
- エラーセル
- 数値セル
- 文字列セル
- 値セル
- Chart
- 条件付き書式
- データの検証
- 定義された名前
- ドキュメントのプロパティ
- 数式
- ハイパーリンク
- 結合エリア
- ピボットテーブル
- 設定
- 図形
- シートデータ
- シート設定
- 構造
- スタイル
- テーブル
- VBA
- XmlMap
ワークブックのデータの読み込み中にデータをフィルタリングする
次のサンプルコードは、ワークブックから図をフィルタリングする方法を示しています。サンプルのExcelファイルを参照してください。すべてのチャート/図形/画像がワークブックからフィルタリングされていることがわかります。
サンプルコード
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Filter all drawing objects(including Chart, Picture, OleObject and all other drawing objects) from the workbook. | |
gridDesktop1.LoadDataFilter = GridLoadDataFilterOptions.All&~GridLoadDataFilterOptions.Drawing; | |
//here is another example ,if we want to filter to show styles and values only, we can use the below code ,notice here we use | | |
// gridDesktop1.LoadDataFilter = GridLoadDataFilterOptions.CellValue | GridLoadDataFilterOptions.Style; | |
gridDesktop1.ImportExcelFile("5472489.xlsx"); | |