Skip to content

Commit

Permalink
Fix for #202 (#211)
Browse files Browse the repository at this point in the history
* Fix for #202

* remove redundancy
  • Loading branch information
YongHee-Kim authored Aug 31, 2022
1 parent 3cc4a33 commit 20b6734
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/workbook.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,17 @@ function Base.show(io::IO, xf::XLSXFile)
println(io, "-"^(21+1+13+1+13))

for s in wb.sheets
name = s.name |> x -> length(x) > 20 ? x[1:20]*"" : x
sheetname = s.name
if textwidth(sheetname) > 20
sheetname = sheetname[collect(eachindex(s.name))[1:20]] * ""
end

if s.dimension != nothing
rg = s.dimension
_size = size(rg) |> x -> string(x[1], "x", x[2])
@printf(io, "%21s %-13s %-13s\n", name, _size, rg)
@printf(io, "%21s %-13s %-13s\n", sheetname, _size, rg)
else
@printf(io, "%21s size unknown\n", name)
@printf(io, "%21s size unknown\n", sheetname)
end
end
end
Expand Down

0 comments on commit 20b6734

Please sign in to comment.