TXLSCellType Enumerated Values
Posted: Mon Apr 15, 2013 5:39 pm
I see that TCellType has changed to TXLSCellType, but I can't find what the enumerated cell types have changed to.
Here is an example of XLRReadWriteII4 code that worked:
case PXLS.Sheets[PSheet].CellType[PCol,PRow] of
ctInteger : XLSCellInt := PXLS.Sheets[PSheet].AsInteger[PCol,PRow];
ctFloat, ctNumberFormula : XLSCellInt := Round(PXLS.Sheets[PSheet].AsFloat[PCol,PRow]);
ctString : begin
Val (PXLS.Sheets[PSheet].AsString[PCol,PRow],Nmbr,Stat);
if Stat = 0 then XLSCellInt := Nmbr else XLSCellInt := 0;
end;
else XLSCellInt := 0;
end;
Now all the case options fail (ctInteger, ctFloat, etc)
I have looked in the sample provided, and I can't see where if shows reading or changing the data type for contents of a cell.
Is there anywhere I can look to find the new cell types or is there an example of reading/changing cell types anywhere?
Thanks
Here is an example of XLRReadWriteII4 code that worked:
case PXLS.Sheets[PSheet].CellType[PCol,PRow] of
ctInteger : XLSCellInt := PXLS.Sheets[PSheet].AsInteger[PCol,PRow];
ctFloat, ctNumberFormula : XLSCellInt := Round(PXLS.Sheets[PSheet].AsFloat[PCol,PRow]);
ctString : begin
Val (PXLS.Sheets[PSheet].AsString[PCol,PRow],Nmbr,Stat);
if Stat = 0 then XLSCellInt := Nmbr else XLSCellInt := 0;
end;
else XLSCellInt := 0;
end;
Now all the case options fail (ctInteger, ctFloat, etc)
I have looked in the sample provided, and I can't see where if shows reading or changing the data type for contents of a cell.
Is there anywhere I can look to find the new cell types or is there an example of reading/changing cell types anywhere?
Thanks