1904 年日付システムの実装
Contents
[
Hide
]
Microsoft Excel は、1900 日付システム (Windows に対して Excel に実装されている既定の日付システム) と 1904 日付システムの 2 つの日付システムをサポートしています。 1904 日付システムは、通常、Macintosh Excel ファイルとの互換性を提供するために使用され、Excel for Macintosh を使用している場合の既定のシステムです。 Aspose.Cells を使用して、Excel ファイルの 1904 年日付システムを設定できます。
Microsoft Excel (たとえば、Microsoft Excel 2003) で 1904 日付システムを実装するには:
-
からツールメニュー、選択オプションをクリックして、計算タブ。
-
を選択1904年日付システムオプション。
-
クリックわかった.
Microsoft Excelで1904日付システムを選択する
Aspose.Cells API を使用してこれを実現する方法については、次のサンプル コードを参照してください。
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
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(Implement1904DateSystem.class); | |
// Initialize a new Workbook | |
Workbook workbook = new Workbook(dataDir + "Mybook.xlsx"); | |
// Implement 1904 date system | |
workbook.getSettings().setDate1904(true); | |
// Save the excel file | |
workbook.save(dataDir + "OutPut.xls"); |