1904年日付システムを実装する
Contents
[
Hide
]
Microsoft Excelは、1900日付システム(Windows用Excelの既定のシステム)と1904日付システムの2つをサポートしています。1904日付システムは通常、Macintosh Excelファイルとの互換性を保つために使用され、Mac用Excelを使用している場合の既定のシステムです。Aspose.Cells for Python via .NETを使用して、Excelファイルに1904日付システムを設定できます。
Microsoft Excel(例えばMicrosoft Excel 2003)で1904年日付システムを実装するには:
- ツールメニューからオプションを選択し、計算タブを選択します。
- 1904年日付システムオプションを選択します。
- OK をクリックします。
Microsoft Excelで1904年日付システムを選択 |
---|
![]() |
これを実現するためのサンプルコードをAspose.Cells for Python via .NET APIでご覧ください。 |
This file contains hidden or 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
from aspose.cells import Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# The path to the documents directory. | |
dataDir = RunExamples.GetDataDir(".") | |
# Initialize a new Workbook | |
# Open an excel file | |
workbook = Workbook(dataDir + "book1.xlsx") | |
# Implement 1904 date system | |
workbook.settings.date1904 = True | |
# Save the excel file | |
workbook.save(dataDir + "Mybook.out.xlsx") |