Skip to content

Commit 9e90cf4

Browse files
committed
👕 minor update
1 parent 3ae9a41 commit 9e90cf4

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

Diff for: notebook.ipynb

+5-13
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,27 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 2,
5+
"execution_count": 3,
66
"metadata": {},
77
"outputs": [
8-
{
9-
"name": "stderr",
10-
"output_type": "stream",
11-
"text": [
12-
"WARNING:csvtotable:\n",
13-
"Virtual scroll is enabled since number of rows exceeds None. You can set custom row limit by setting flag -vs, --virtual-scroll. Virtual scroll can be disabled by setting the value to -1 and set it to 0 to always enable.\n"
14-
]
15-
},
168
{
179
"data": {
1810
"text/html": [
1911
"\n",
2012
" <iframe\n",
2113
" width=\"600\"\n",
22-
" height=\"600\"\n",
14+
" height=\"520\"\n",
2315
" src=\"me.sortable.html\"\n",
2416
" frameborder=\"0\"\n",
2517
" allowfullscreen\n",
2618
" ></iframe>\n",
2719
" "
2820
],
2921
"text/plain": [
30-
"<IPython.lib.display.IFrame at 0x110da8f90>"
22+
"<IPython.lib.display.IFrame at 0x111941e90>"
3123
]
3224
},
33-
"execution_count": 2,
25+
"execution_count": 3,
3426
"metadata": {},
3527
"output_type": "execute_result"
3628
}
@@ -40,7 +32,7 @@
4032
"sheet = p.get_sheet(file_name='goog.ods')\n",
4133
"sheet.save_as('me.sortable.html', display_length=10)\n",
4234
"from IPython.display import IFrame\n",
43-
"IFrame(\"me.sortable.html\", width=600, height=600)"
35+
"IFrame(\"me.sortable.html\", width=600, height=520)"
4436
]
4537
},
4638
{

Diff for: pyexcel_sortable/sortable.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,19 @@ def render_sheet_to_stream(self, file_stream, sheet,
2727

2828
html = render_template(
2929
sheet.colnames, sheet.array[1:],
30-
notebook=True, # difference
30+
notebook=True,
3131
caption=caption, display_length=display_length)
3232
self._stream.write(html)
3333

3434
def render_sheet(self, sheet, caption="", display_length=None,
35-
**keywords):
35+
**keywords):
3636
if len(sheet.colnames) == 0:
3737
sheet.name_columns_by_row(0)
3838

3939
html = render_template(
4040
sheet.colnames, sheet.array[1:],
4141
caption=caption, pagination=True, export=False,
42+
virtual_scroll=-1,
4243
display_length=display_length)
4344

4445
js_freezed_html = freeze_js(html)

0 commit comments

Comments
 (0)