قم بتعبئة البيانات أولاً بصف ثم بالعمود
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"); |