gunner4evr
gunner4evr

Reputation: 79

Is there a way to set the datatype of Aspose cells directly from the c# code?

I need to specify the datatype of the Aspose cells directly from the C# code. When I try to set a value to ‘cell.Type’, I get an error that, ‘Property or indexer ‘Cell.Type’ cannot be assigned to – its is read only’. Is there any other way to do this?

Data and datatypes comes from another service. With each cell, there is a datatype coming in from an external service. I want to set the datatype of the cells from code.

for(int i = 0; i< columnCount; i++)
{
Cell cell = cellSheet.Cells[rowIndex,colIndex];
var dataType = dataTable.Columns[i].DataType.Name;
//How to specify the datatype of each column to the datatype that i get in above line?
}

Upvotes: 1

Views: 893

Answers (0)

Related Questions