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
TXLSCellType Enumerated Values
Re: TXLSCellType Enumerated Values
Hello,
I had the same problem, the definition of the TXLSCellType has changed. So, just add 'x' as prefix.
See definition below.
I had the same problem, the definition of the TXLSCellType has changed. So, just add 'x' as prefix.
See definition below.
Code: Select all
type TXLSCellType = (xctNone, //* Undefined cell.
xctBlank, //* Blank cell.
xctBoolean, //* Boolean cell.
xctError, //* Cell with an error value.
xctString, //* String cell (index into SST).
xctFloat, //* Floating point cell.
xctFloatFormula, //* Formula cell where the result of the formula is a numeric value.
xctStringFormula, //* Formula cell where the result of the formula is a string value.
xctBooleanFormula, //* Formula cell where the result of the formula is a boolean value.
xctErrorFormula //* Formula cell where the result of the formula is an error value.
);
Re: TXLSCellType Enumerated Values
Thanks very much
I thought I had tried that first, but I guess I still had the USES entries wrong
I thought I had tried that first, but I guess I still had the USES entries wrong
Re: TXLSCellType Enumerated Values
When I compile with the leading "x", I still get a compile error using all the modules defined in the CELL FORMAT sample
Are the changed definitions defined somewhere in V5? If so what module?
CTINTEGER never occurs in the XLSSRC folder with or without an "x"
If they are not already defined, where did you find the list in your response? Are you sure that is the complete list and they are in the right order?
Having any of those definitions wrong would be a difficult problem to isolate once the program used.
Also, how did you find the changed definitions?
Thanks again
Are the changed definitions defined somewhere in V5? If so what module?
CTINTEGER never occurs in the XLSSRC folder with or without an "x"
If they are not already defined, where did you find the list in your response? Are you sure that is the complete list and they are in the right order?
Having any of those definitions wrong would be a difficult problem to isolate once the program used.
Also, how did you find the changed definitions?
Thanks again
Re: TXLSCellType Enumerated Values
I found the definition of TXSLCellType in the Xc12Utils5 unit in the SrcXLS directory.
Re: TXLSCellType Enumerated Values
Thanks
I see now that ctInteger has gone away
I see now that ctInteger has gone away
Re: TXLSCellType Enumerated Values
Hello
The ctInteger value was removed as there are no integer cells in excel.
The ctInteger value was removed as there are no integer cells in excel.
Lars Arvidsson, Axolot Data