Skip to content

Commit

Permalink
**Try** parse number format (fix Issue #180).
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Dec 14, 2021
1 parent 2867e86 commit abcc754
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Client/OfficeInterop/Functions/BuildingBlockFunctions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ let private getBuildingBlocksPostSync (annoHeaderRange:Excel.Range) (annoBodyRan
let cellUnit =
let unit = numberFormats.[ind].[i]
if unit.IsSome && string unit.Value <> "General" then
TermMinimal.ofNumberFormat (string unit.Value) |> Some
// This case was added, as a numberFormat of "Text" resulted in an error.
try
TermMinimal.ofNumberFormat (string unit.Value) |> Some
with
| _ -> None
else
None
// start cell row index by 1, as 0 will later be used for the header
Expand Down

0 comments on commit abcc754

Please sign in to comment.