File tree Expand file tree Collapse file tree 4 files changed +134
-0
lines changed Expand file tree Collapse file tree 4 files changed +134
-0
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,36 @@ Hightlighted features:
11
11
#. Merge files in various excel file formats into one
12
12
#. Split a multi-sheet excel file into single sheet files
13
13
#. Find difference in data between two excel files
14
+
15
+ Usage
16
+ ================================================================================
17
+
18
+ Here is an example usage:
19
+
20
+ .. code-block:: bash
21
+
22
+ $ pyexcel view https://github.com/pyexcel/pyexcel-cli/blob/master/tests/fixtures/multiple-sheets.xls
23
+ Sheet 1:
24
+ +---+---+---+
25
+ | 1 | 2 | 3 |
26
+ +---+---+---+
27
+ | 4 | 5 | 6 |
28
+ +---+---+---+
29
+ | 7 | 8 | 9 |
30
+ +---+---+---+
31
+ Sheet 2:
32
+ +---+---+---+
33
+ | X | Y | Z |
34
+ +---+---+---+
35
+ | 1 | 2 | 3 |
36
+ +---+---+---+
37
+ | 4 | 5 | 6 |
38
+ +---+---+---+
39
+ Sheet 3:
40
+ +---+---+---+
41
+ | O | P | Q |
42
+ +---+---+---+
43
+ | 3 | 2 | 1 |
44
+ +---+---+---+
45
+ | 4 | 3 | 2 |
46
+ +---+---+---+
Original file line number Diff line number Diff line change @@ -26,6 +26,39 @@ Hightlighted features:
26
26
#. Split a multi-sheet excel file into single sheet files
27
27
#. Find difference in data between two excel files
28
28
29
+ Usage
30
+ ================================================================================
31
+
32
+ Here is an example usage:
33
+
34
+ .. code-block :: bash
35
+
36
+ $ pyexcel view https://github.com/pyexcel/pyexcel-cli/blob/master/tests/fixtures/multiple-sheets.xls
37
+ Sheet 1:
38
+ +---+---+---+
39
+ | 1 | 2 | 3 |
40
+ +---+---+---+
41
+ | 4 | 5 | 6 |
42
+ +---+---+---+
43
+ | 7 | 8 | 9 |
44
+ +---+---+---+
45
+ Sheet 2:
46
+ +---+---+---+
47
+ | X | Y | Z |
48
+ +---+---+---+
49
+ | 1 | 2 | 3 |
50
+ +---+---+---+
51
+ | 4 | 5 | 6 |
52
+ +---+---+---+
53
+ Sheet 3:
54
+ +---+---+---+
55
+ | O | P | Q |
56
+ +---+---+---+
57
+ | 3 | 2 | 1 |
58
+ +---+---+---+
59
+ | 4 | 3 | 2 |
60
+ +---+---+---+
61
+
29
62
.. _file-format-list :
30
63
31
64
.. table :: A list of file formats supported by external plugins
Original file line number Diff line number Diff line change @@ -25,6 +25,39 @@ Hightlighted features:
25
25
#. Split a multi-sheet excel file into single sheet files
26
26
#. Find difference in data between two excel files
27
27
28
+ Usage
29
+ ================================================================================
30
+
31
+ Here is an example usage:
32
+
33
+ .. code-block :: bash
34
+
35
+ $ pyexcel view https://github.com/pyexcel/pyexcel-cli/blob/master/tests/fixtures/multiple-sheets.xls
36
+ Sheet 1:
37
+ +---+---+---+
38
+ | 1 | 2 | 3 |
39
+ +---+---+---+
40
+ | 4 | 5 | 6 |
41
+ +---+---+---+
42
+ | 7 | 8 | 9 |
43
+ +---+---+---+
44
+ Sheet 2:
45
+ +---+---+---+
46
+ | X | Y | Z |
47
+ +---+---+---+
48
+ | 1 | 2 | 3 |
49
+ +---+---+---+
50
+ | 4 | 5 | 6 |
51
+ +---+---+---+
52
+ Sheet 3:
53
+ +---+---+---+
54
+ | O | P | Q |
55
+ +---+---+---+
56
+ | 3 | 2 | 1 |
57
+ +---+---+---+
58
+ | 4 | 3 | 2 |
59
+ +---+---+---+
60
+
28
61
Installation
29
62
================================================================================
30
63
Original file line number Diff line number Diff line change 2
2
from nose .tools import eq_
3
3
from pyexcel_cli .view import view
4
4
from click .testing import CliRunner
5
+ from textwrap import dedent
5
6
6
7
7
8
def test_stdin_option ():
@@ -23,3 +24,37 @@ def test_stdout_option():
23
24
test_fixture ])
24
25
eq_ (result .exit_code , 0 )
25
26
eq_ (result .output , '1,2,3\n ' )
27
+
28
+
29
+ def test_url_option ():
30
+ runner = CliRunner ()
31
+ test_fixture = "https://github.com/pyexcel/pyexcel-cli/raw/master/tests/fixtures/multiple-sheets.xls" # noqa
32
+ result = runner .invoke (view , [test_fixture ])
33
+ expected = dedent ("""
34
+ Sheet 1:
35
+ +---+---+---+
36
+ | 1 | 2 | 3 |
37
+ +---+---+---+
38
+ | 4 | 5 | 6 |
39
+ +---+---+---+
40
+ | 7 | 8 | 9 |
41
+ +---+---+---+
42
+ Sheet 2:
43
+ +---+---+---+
44
+ | X | Y | Z |
45
+ +---+---+---+
46
+ | 1 | 2 | 3 |
47
+ +---+---+---+
48
+ | 4 | 5 | 6 |
49
+ +---+---+---+
50
+ Sheet 3:
51
+ +---+---+---+
52
+ | O | P | Q |
53
+ +---+---+---+
54
+ | 3 | 2 | 1 |
55
+ +---+---+---+
56
+ | 4 | 3 | 2 |
57
+ +---+---+---+
58
+ """ ).strip ('\n ' )
59
+ eq_ (result .exit_code , 0 )
60
+ eq_ (result .output , expected )
You can’t perform that action at this time.
0 commit comments