# BrowseTables configure details of table

**URL:** <https://discourse.julialang.org/t/browsetables-configure-details-of-table/58486>\
**Category:** General Usage\
**Tags:** visualization, tables\
**Created:** [April 3, 2021, 9:11am UTC](https://discourse.julialang.org/t/browsetables-configure-details-of-table/58486 "2021-04-03T09:11:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [April 3, 2021, 9:11am UTC](https://discourse.julialang.org/t/browsetables-configure-details-of-table/58486/1 "2021-04-03T09:11:55Z")

</div>

I have a table in a Pluto notebook that I would prefer to have as an HTML object, so that I can smoothly integrate it with test in markdown. BrowseTables.jl does exacly that - defining an HTMLTable and using the $variable string interpolation inside a markdown string works great, as demonstrated below.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/4/24d3d43abb6e3df8adf448846e2493213505c37d.png)

I am however struggeling with the API of BrowseTables for custumization, and I find the documentation lacking.

First of all, I dont understand why my `caption` looks like a title, and I have no idea where my actual `title` has gone.

Secondly, I think that for a table like this, the heavy blue line at the top AND bottom is too much. I can however not see how I would change this from the minimalistic documentation. I would love the ability to make the blue more light, and to remove the bottom line.

Another thing that I think might be better as an issue with the package but included here in order not to split things up unessecarily, is the fact that it seems like BrowseTables changes some defults in the tables already defined in my pluto notebook through markdown. Below are two pictures without `using BrowseTables`:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/b/bb28b2e6360bcfb53a85d12a496fafe716cf5770.png)  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/0/2/02c16fc2b1097f09c67a3e7731e6468e171723a7.png)

And here are two WITH `using BrowseTables`:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/0/e05a125fcdd100d279733876456bfd22356412ef.png)  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/5/5/55abdabc0099894e9ef8f649c172b14fc958e4eb.png)

In general, I prefer the defaults that are used by Pluto to the ones from BrowseTables that seem to overwrite the Pluto-defaults. Maybe Pluto could be an optional style? Or wherever those defaults are actually defined anyways.

If we could get some detailed explanation of how the arguments work, I would be happy to write up some documentation for BrowseTables.jl, as I think the package solves a problem that I happened to stumble upon and so deserves work put into it 🙂

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 3, 2021, 1:38pm UTC](https://discourse.julialang.org/t/browsetables-configure-details-of-table/58486/2 "2021-04-03T13:38:10Z")

</div>

Package author here — I am happy to hear that you find it useful.

Issues and PRs are welcome, I added an empty docs template and did some housekeeping (CI with actions).

---

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [April 3, 2021, 3:01pm UTC](https://discourse.julialang.org/t/browsetables-configure-details-of-table/58486/3 "2021-04-03T15:01:07Z")

</div>

Problem is, I don’t know what to put in the docs because I current have questions as opposed to answers…

Are you saying that I should create issues over at the package-repo and take things from there?

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [April 3, 2021, 7:05pm UTC](https://discourse.julialang.org/t/browsetables-configure-details-of-table/58486/4 "2021-04-03T19:05:56Z")

</div>

@Tamas_Papp, your BrowseTables viewer is excellent, very useful for large tables.

Tried it with code below and would like to ask you how to format the numbers highlighted? Thanks in advance.

 ![BrowseTables_number_format](https://global.discourse-cdn.com/julialang/original/3X/3/2/32407bf7eb87a6a0f2e388bb77b3b2438a4baf24.png)

```julia
using BrowseTables, XLSX, DataFrames

url = "https://download.microsoft.com/download/1/4/E/14EDED28-6C58-4055-A65C-23B4DA81C4DE/Financial%20Sample.xlsx"

download(url, "Sample_data2.xlsx")

df = DataFrame(XLSX.readtable("Sample_data2.xlsx", "Sheet1", infer_eltypes=true)...)

open_html_table(df) # open in browser

```

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 4, 2021, 4:41am UTC](https://discourse.julialang.org/t/browsetables-configure-details-of-table/58486/5 "2021-04-04T04:41:43Z")

</div>

Yes, please unbundle the suggestions above and open issues and PRs. That said, the API has docstrings so the package has some documentation, it is just not in the generated docs.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 4, 2021, 4:48am UTC](https://discourse.julialang.org/t/browsetables-configure-details-of-table/58486/6 "2021-04-04T04:48:26Z")

</div>

> [@rafael.guerra](#):
>
> how to format the numbers highlighted?

I would round them before calling `open_html_table`.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [April 4, 2021, 10:18am UTC](https://discourse.julialang.org/t/browsetables-configure-details-of-table/58486/7 "2021-04-04T10:18:47Z")

</div>

@Tamas_Papp, it is interesting that in the original Excel file in example above, even when we ask Excel to display values with 20 digits, say for row (55/54) and Sales column (10), it still shows only zeros after `.85`:  
`$27,338.85000000000000000000`  
However, the XLSX.jl read + DataFrames.jl “direct” workflow above extracts:  
`27338.850000000002`

Such problem repeats for a quite large number of Excel entries.  
So these numerical annoyances seem to occur before BrowseTables.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [April 4, 2021, 1:19pm UTC](https://discourse.julialang.org/t/browsetables-configure-details-of-table/58486/8 "2021-04-04T13:19:42Z")

</div>

@Tamas_Papp, the simple round-off loop below fixes the problem for the example at hands:

```julia
using BrowseTables, XLSX, DataFrames

url = "https://download.microsoft.com/download/1/4/E/14EDED28-6C58-4055-A65C-23B4DA81C4DE/Financial%20Sample.xlsx"

download(url, "Sample_data2.xlsx")

df = DataFrame(XLSX.readtable("Sample_data2.xlsx", "Sheet1", infer_eltypes=true)...)

for n in names(df)
    if eltype(df[!,n]) <: Number
        df[!,n] = round.(df[!,n], digits=2)
    end
end 

open_html_table(df) # open in browser

```

It would probably be more convenient for the users if such rounding-off functionalities were built-in in BrowseTables.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 4, 2021, 1:37pm UTC](https://discourse.julialang.org/t/browsetables-configure-details-of-table/58486/9 "2021-04-04T13:37:01Z")

</div>

> [@rafael.guerra](#):
>
> It seems more convenient for the users that such rounding functionalities were built-in in the BrowseTables.

I disagree, preprocessing your data is orthogonal to displaying it and the two need not be coupled.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [April 4, 2021, 2:10pm UTC](https://discourse.julialang.org/t/browsetables-configure-details-of-table/58486/10 "2021-04-04T14:10:05Z")

</div>

OK, let’s agree to disagree. 😉
