1
- Extend pyexcel-io Tutorial
1
+ Extend pyexcel-io for other excel or tabular formats
2
2
================================================================================
3
3
4
4
You are welcome to extend pyexcel-io to read and write more tabular formats.
@@ -26,7 +26,7 @@ we can use get_data() to read yaml file out.
26
26
27
27
**Implement IReader **
28
28
29
- First, let's impolement reader interface as below. Three implementations are required :
29
+ First, let's implement reader interface:
30
30
31
31
1. `content_array ` attribute, is expected to be a list of `NamedContent `
32
32
2. `read_sheet ` function, read sheet content by its index.
@@ -41,10 +41,10 @@ First, let's impolement reader interface as below. Three implementations are req
41
41
`YourSingleSheet ` makes this simple task complex in order to show case its inner
42
42
workings. Two abstract functions require implementation:
43
43
44
- 1. `row_iterator `: should return a row: either content arry or content index as long as
45
- `column_iterator ` understands
44
+ 1. `row_iterator `: should return a row: either content arary or content index as long as
45
+ `column_iterator ` can use it to return the cell value.
46
46
47
- 2. `column_iterator `: should return cell values one by one .
47
+ 2. `column_iterator `: should iterate cell value from the given row .
48
48
49
49
.. literalinclude :: ../../examples/custom_yaml_reader.py
50
50
:language: python
@@ -63,6 +63,8 @@ files on physical disk. "memory" means a file stream. "content" means a string b
63
63
:language: python
64
64
:lines: 36-41
65
65
66
+ Usually, this registration code was placed in __init__.py file at the top level of your
67
+ extension source tree. You can take a look at any pyexcel plugins for reference.
66
68
67
69
**Test your reader **
68
70
0 commit comments