最初に行、次に列ごとにデータを埋めます
Contents
[
Hide
]
スプレッドシートにデータを最初に行ごと、次に列ごとに埋めると、全体のパフォーマンスが向上します。
最初に行、次に列ごとにデータを埋める
A1、B1、A2、B2の順にデータを入れることは、A1、A2、B1、B2の順よりも速くなります。ワークシートに多くのセルがある場合、データを行ごとに入力する場合、このヒントはプログラムをはるかに高速化できます。
行ごとに先に、次に列ごとにデータを埋めるためのJavaコード
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(PopulateDatabyRowthenColumn.class); | |
Workbook workbook = new Workbook(); | |
Cells cells = workbook.getWorksheets().get(0).getCells(); | |
cells.get("A1").setValue("data1"); | |
cells.get("B1").setValue("data2"); | |
cells.get("A2").setValue("data3"); | |
cells.get("B2").setValue("data4"); |