Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

ISTEXT() return wrong result if referencing an empty but formatted cell #273

Merged
merged 1 commit into from
Nov 23, 2013

Conversation

PowerKiKi
Copy link
Member

ISTEXT should always return FALSE for empty cells, however PHPExcel returns
TRUE if the cell is formatted. This can be reproduced in Excel by choosing
formatting category "Text" for cell A1, and then in cell B1 input the
formula '=ISTEXT(A1)'. B1 will display FALSE, but PHPExcel will return TRUE.

This patch fix the NULL value being incorrectly cast to an empty string, and
thus eliminating ISTEXT() issue (and probably several others).

ISTEXT should always return FALSE for empty cells, however PHPExcel returns
TRUE if the cell is formatted. This can be reproduced in Excel by choosing
formatting category "Text" for cell A1, and then in cell B1 input the
formula '=ISTEXT(A1)'. B1 will display FALSE, but PHPExcel will return TRUE.

This patch fix the NULL value being incorrectly cast to an empty string, and
thus eliminating ISTEXT() issue (and probably several others).
MarkBaker pushed a commit that referenced this pull request Nov 23, 2013
ISTEXT() return wrong result if referencing an empty but formatted cell
@MarkBaker MarkBaker merged commit aa5a9d4 into PHPOffice:develop Nov 23, 2013
@MarkBaker
Copy link
Member

Good catch, thanks

MarkBaker pushed a commit that referenced this pull request Nov 23, 2013
…f referencing an empty but formatted cell
@PowerKiKi PowerKiKi deleted the issue_is_text branch December 4, 2013 00:11
@Progi1984 Progi1984 modified the milestone: 1.8.0 Aug 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants