Primero llenar datos por fila y luego por columna
Contents
[
Hide
]
Llenar una hoja de cálculo con datos primero por fila y luego por columna mejora el rendimiento general.
Poner datos en la secuencia A1, B1, A2, B2 es más rápido que A1, A2, B1, B2. Si hay muchas celdas en una hoja de cálculo y sigues la segunda secuencia, es decir, estás llenando los datos fila por fila, este consejo puede hacer que el programa sea mucho más rápido.
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-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
// Create a workbook | |
Workbook workbook = new Workbook(); | |
// Populate Data into Cells | |
Cells cells = workbook.Worksheets[0].Cells; | |
cells["A1"].PutValue("data1"); | |
cells["B1"].PutValue("data2"); | |
cells["A2"].PutValue("data3"); | |
cells["B2"].PutValue("data4"); | |
// Save workbook | |
workbook.Save(dataDir + "output_out.xlsx"); |