Hi,
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for considering Aspose.
Well, for iteration you may use Cells[int RowIndex,int ColumnIndex] collection. I am not very clear what you mean by “fields” but you may check the following sample code which explains how to put values into first four cells of first row by iterating the cells collection:
//initialize the workbook object
Workbook book = new Workbook();
//Get the first worksheet in the workbook
Worksheet sheet = book.Worksheets[0];
//Get Cells collection in the worksheet
Cells cells = sheet.Cells;
for (int i = 0; i < 4; i++)
{
//Iterate through the cells and put the value
cells[0, 1].PutValue(i + 1);
}
//Save the workbook
book.Save(@"C:\Test_Temp\excel.xls");
If you are still face any problem, please manually create an Excel file using MS Excel and share it here and we will provide you the code segment more suitable as per your exact requirement.
You may use Cell.Value property to get the actual value of the cell as per your requirement.
Thank You & Best Regards,
You may use Cell.Value property to get the actual value of the cell as per your requirement.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />Hi Shalini,
Thank you for considering Aspose.
Well, you can use different data types in the Cell.PutValue method as per your requirement. For numeric value 123, you may simply use Cell.PutValue(123). Please see the list of the Cell.PutValue overloads available using the following documentation link:
Thank you & Best Regards,