Skip to content

Commit

Permalink
fix #68
Browse files Browse the repository at this point in the history
  • Loading branch information
felipenoris committed Nov 18, 2018
1 parent 307c32c commit 065015f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function _celldata_datetime(v::AbstractString, _is_date_1904::Bool) :: Union{Dat
# does not allow empty string
@assert !isempty(v) "Cannot convert an empty string into a datetime value."

if occursin(".", v)
if occursin(".", v) || v == "0"
time_value = parse(Float64, v)
@assert time_value >= 0

Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ end
data[3] = [101.5, 102.5, missing, 104.5]
data[4] = [ true, false, missing, true]
data[5] = [ Date(2018, 2, 1), Date(2018, 3, 1), Date(2018,5,20), Date(2018, 6, 2)]
data[6] = [ Dates.Time(19, 10), Dates.Time(19, 20), Dates.Time(19, 30), Dates.Time(19, 40) ]
data[6] = [ Dates.Time(19, 10), Dates.Time(19, 20), Dates.Time(19, 30), Dates.Time(0, 0) ]
data[7] = [ Dates.DateTime(2018, 5, 20, 19, 10), Dates.DateTime(2018, 5, 20, 19, 20), Dates.DateTime(2018, 5, 20, 19, 30), Dates.DateTime(2018, 5, 20, 19, 40)]

XLSX.writetable("output_table.xlsx", data, col_names, overwrite=true, sheetname="report", anchor_cell="B2")
Expand Down

0 comments on commit 065015f

Please sign in to comment.