ワークシートがダイアログシートであるかを検索する

可能な使用シナリオ

可能な使用シナリオ

todo:image_alt_text

Aspose.Cells for Python via .NETが提供するWorksheet.typeプロパティを使用して、シートがダイアログシートか他のタイプのシートかどうかを確認できます。列挙値SheetType.DIALOGを返す場合は、ダイアログシートを扱っていることを示します。

ワークシートがダイアログシートであるかを検索する

サンプルExcelファイルを読み込み、ダイアログシートを含むかどうかをチェックし、Worksheet.typeプロパティをチェックしてSheetType.DIALOGと比較し、メッセージを表示します。サンプルコードのコンソール出力も参照してください。

サンプルコード

from aspose.cells import SheetType, Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# Load Excel file containing Dialog Sheet
wb = Workbook("sampleFindIfWorksheetIsDialogSheet.xlsx")
# Access first worksheet
ws = wb.worksheets[0]
# Find if the sheet type is dialog and print the message
if ws.type == SheetType.DIALOG:
print("Worksheet is a Dialog Sheet.")

コンソール出力

Worksheet is a Dialog Sheet.