Skip to content

Commit

Permalink
handle casting in data accessor when a string is expected
Browse files Browse the repository at this point in the history
  • Loading branch information
adecler authored and al-fisher committed Feb 19, 2021
1 parent 4c56c9f commit 44f3c78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Excel_UI/Templates/FormulaDataAccessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ public virtual T GetDataItem<T>(int index)
}
else if (type == typeof(Guid) && item is string)
return (T)(Guid.Parse(item as string) as dynamic);
else if (type == typeof(string) && !(item is string))
return item.ToString() as dynamic;
else
{
// Can't always cast directly to T from object storage type even
Expand Down

0 comments on commit 44f3c78

Please sign in to comment.