f_xlsx 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +38 -0
- data/LICENSE.txt +21 -0
- data/Makefile +32 -0
- data/README.md +51 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/ext/excel.dylib +0 -0
- data/ext/excel.h +107 -0
- data/ext/excel.so +0 -0
- data/ext/go.mod +19 -0
- data/ext/go.sum +69 -0
- data/ext/types.h +23 -0
- data/ext/xlsx.go +299 -0
- data/f_xlsx.gemspec +43 -0
- data/lib/f_xlsx/base_types.rb +63 -0
- data/lib/f_xlsx/file.rb +180 -0
- data/lib/f_xlsx/lib_c.rb +20 -0
- data/lib/f_xlsx/version.rb +3 -0
- data/lib/f_xlsx/xlsx_ext.rb +44 -0
- data/lib/f_xlsx.rb +17 -0
- data/test.rb +22 -0
- metadata +134 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4c5c7a0f1abf06d9ea8a8156895275b18fcf60553b6b52f18741c9e9f8a34142
|
4
|
+
data.tar.gz: 6575375099c71e7b215de7b5379a9f49955d3f639e76aa384f2940e4700706ed
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2b0d5f6f8d92f42f91219cf3a542ef2d8f2c62edd9f8937338047e6e35cab46f26d74dddc2655e285c993b19e150a7e2441ddcc422ec9f51f3880015a790a7c3
|
7
|
+
data.tar.gz: 89a79da402d6e4b8ed82d96c2c5fa96f2360782aa7dd99f0d34cd995cb493a4214214c6fd5da8ffa265901d4e3dd8cfb6e076b2f2dedadd6b59b7ac3181e5f4f
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at dong.wang@rccchina.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
f_xlsx (0.2.5)
|
5
|
+
ffi (~> 1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://gems.ruby-china.com/
|
9
|
+
specs:
|
10
|
+
diff-lcs (1.5.0)
|
11
|
+
ffi (1.16.3)
|
12
|
+
rake (13.0.6)
|
13
|
+
rspec (3.12.0)
|
14
|
+
rspec-core (~> 3.12.0)
|
15
|
+
rspec-expectations (~> 3.12.0)
|
16
|
+
rspec-mocks (~> 3.12.0)
|
17
|
+
rspec-core (3.12.2)
|
18
|
+
rspec-support (~> 3.12.0)
|
19
|
+
rspec-expectations (3.12.3)
|
20
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
21
|
+
rspec-support (~> 3.12.0)
|
22
|
+
rspec-mocks (3.12.5)
|
23
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
24
|
+
rspec-support (~> 3.12.0)
|
25
|
+
rspec-support (3.12.1)
|
26
|
+
|
27
|
+
PLATFORMS
|
28
|
+
x86_64-darwin-19
|
29
|
+
x86_64-darwin-21
|
30
|
+
|
31
|
+
DEPENDENCIES
|
32
|
+
bundler (>= 1.0, <= 3.0)
|
33
|
+
f_xlsx!
|
34
|
+
rake (~> 13.0)
|
35
|
+
rspec (~> 3.0)
|
36
|
+
|
37
|
+
BUNDLED WITH
|
38
|
+
2.2.3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2023 dong.wang
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/Makefile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
LIB = excel
|
2
|
+
|
3
|
+
ifeq ($(OS),Windows_NT)
|
4
|
+
# Windows
|
5
|
+
LIB := $(LIB).dll
|
6
|
+
else
|
7
|
+
UNAME_S := $(shell uname -s)
|
8
|
+
ifeq ($(UNAME_S),Linux)
|
9
|
+
# Linux
|
10
|
+
LIB := $(LIB).so
|
11
|
+
else
|
12
|
+
ifeq ($(UNAME_S),Darwin)
|
13
|
+
# Mac
|
14
|
+
LIB := $(LIB).dylib
|
15
|
+
endif
|
16
|
+
endif
|
17
|
+
endif
|
18
|
+
|
19
|
+
build: ext/$(LIB)
|
20
|
+
gem build f_xlsx.gemspec -o pkg/f_xlsx-0.2.8.gem
|
21
|
+
|
22
|
+
ext/$(LIB): ext/types.h ext/excel.h ext/xlsx.go
|
23
|
+
cd ext && go mod tidy && go build -buildmode=c-shared -o $(LIB) xlsx.go
|
24
|
+
|
25
|
+
clean:
|
26
|
+
rm -f ext/$(LIB) f_xlsx-*.gem
|
27
|
+
test:
|
28
|
+
ruby test.rb
|
29
|
+
stop: test.pid
|
30
|
+
kill -2 $$(cat test.pid)
|
31
|
+
rm test.pid
|
32
|
+
|
data/README.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# FXlsx
|
2
|
+
## 说明
|
3
|
+
项目包含ext目录,目录下为go项目
|
4
|
+
使用go excelize库并编译为c链接库
|
5
|
+
gem 使用ffi调用链接库提供的方法,进而提供编辑xlsx文件的功能。
|
6
|
+
## 使用
|
7
|
+
|
8
|
+
1. 打开文件
|
9
|
+
- 读取已有文件
|
10
|
+
```ruby
|
11
|
+
f = FXlsx.open_file('文件路径')
|
12
|
+
```
|
13
|
+
- 新文件
|
14
|
+
```ruby
|
15
|
+
f = FXlsx.new_file
|
16
|
+
```
|
17
|
+
2. 操作方法调用
|
18
|
+
|
19
|
+
| 方法名 | 说明 | 参数说明 |
|
20
|
+
| ---- | ---- | ---- |
|
21
|
+
| f.new_sheet(sheet_name) | 创建指定名称sheet | sheet_name为指定名 |
|
22
|
+
| f.set_sheet_name(source_sheet_name, target_sheet_name) | 修改sheet名 | source_sheet_name:要修改的sheet名<br/>target_sheet_name:要修改为sheet名 |
|
23
|
+
| f.set_sheet_visible(sheet_name, visible) | 设置sheet可见 | sheet_name:要操作的sheet名<br/>visible: true可见,false不可见 |
|
24
|
+
| visible = f.get_sheet_visible(sheet_name) | 获取sheet是否可见 | sheet_name:要操作的sheet名<br/> visible: 返回值 true则为可见,false不可见 |
|
25
|
+
| f.delete_sheet(sheet_name) | 删除sheet | sheet_name:要操作的sheet名 |
|
26
|
+
| names = f.get_sheet_list(sheet_name) | 获取全部sheet名 | sheet_name:要操作的sheet名<br/>names: 返回值为sheet名数组 |
|
27
|
+
| name = f.get_sheet_name(index) | 获取指定索引sheet名 | index:sheet索引值(0开始)<br/>name: 返回值为sheet名 |
|
28
|
+
| f.set_cell_value(sheet_name, row, col, value) | 设置单元格值 | sheet_name:要操作的sheet名<br/>row:行序号(0开始) <br/>col:列序号(0开始) <br/> value:值,可为int,float,string,nil |
|
29
|
+
| val = f.get_cell_value(sheet_name, row, col) | 获取单元格内容 |sheet_name:要操作的sheet名<br/>row:行序号(0开始) <br/>col:列序号(0开始) <br/> val:返回值,单元格内容(string) |
|
30
|
+
| rows = f.get_rows(sheet_name) | 获取指定sheet内全部内容 | sheet_name:要操作的sheet名<br/>rows:返回值,二维字符串数组 |
|
31
|
+
| f.put_row(sheet_name, row_index, row) | 设置指定行内容 | sheet_name:要操作的sheet名<br/>row_index:行索引<br/> row:要设置的行内容,字符串数组 |
|
32
|
+
| f.put_rows(sheet_name, rows) | 设置sheet内容 | sheet_name:要操作的sheet名<br/>rows: 要设置的内容,二位字符串数组 |
|
33
|
+
| f.merge_cell(sheet_name, start_row, start_col, end_row, end_col) | 合并单元格 | sheet_name:要操作的sheet名<br/>start_row:左上角行索引<br/>start_col:左上角列索引<br/>end_row:右下角行索引<br/>end_col:右下角列索引 |
|
34
|
+
| f.unmerge_cell(sheet_name, start_row, start_col, end_row, end_col) | 拆分单元格 | sheet_name:要操作的sheet名<br/>start_row:左上角行索引<br/>start_col:左上角列索引<br/>end_row:右下角行索引<br/>end_col:右下角列索引 |
|
35
|
+
| cells = f.get_merge_cells(sheet_name) | 获取全部合并单元格 | sheet_name:要操作的sheet名<br/> cells: 返回值,已合并的单元格信息,数组,{ start_row:左上角行索引, start_col:左上角列索引, end_row:右下角行索引, end_col:右下角列索引, value: 单元格值(字符串) } |
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
3. 保存
|
40
|
+
- 打开已有文件时保存:f.save
|
41
|
+
- 新文件保存: f.save_as(file_path)
|
42
|
+
|
43
|
+
4. **注意事项**
|
44
|
+
|
45
|
+
仅能调用 FXlsx::File(含FXlsx代理出的两个方法open_file,new_file) 下的类/实例方法(即readme里说明的方法),不要调用FXlsx::XlsxExt/FXlsx::LibC 下的任何方法;因为 FXlsx::File 下的方法调用后释放内存,而其他地方的未做内存释放。
|
46
|
+
## 跨平台编译
|
47
|
+
前提条件:安装 go
|
48
|
+
1. cd ext 路径
|
49
|
+
2. 执行go mod tidy
|
50
|
+
3. ./build.sh 打包c链接库(需修改链接库名为当前操作系统链接库后缀)
|
51
|
+
4. 返回主目录,gem build f_xlsx.gemspec打包gem
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "f_xlsx"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/ext/excel.dylib
ADDED
Binary file
|
data/ext/excel.h
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
/* Code generated by cmd/cgo; DO NOT EDIT. */
|
2
|
+
|
3
|
+
/* package command-line-arguments */
|
4
|
+
|
5
|
+
|
6
|
+
#line 1 "cgo-builtin-export-prolog"
|
7
|
+
|
8
|
+
#include <stddef.h>
|
9
|
+
|
10
|
+
#ifndef GO_CGO_EXPORT_PROLOGUE_H
|
11
|
+
#define GO_CGO_EXPORT_PROLOGUE_H
|
12
|
+
|
13
|
+
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
14
|
+
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
|
15
|
+
#endif
|
16
|
+
|
17
|
+
#endif
|
18
|
+
|
19
|
+
/* Start of preamble from import "C" comments. */
|
20
|
+
|
21
|
+
|
22
|
+
#line 12 "xlsx.go"
|
23
|
+
|
24
|
+
#include <stdlib.h>
|
25
|
+
#include <types.h>
|
26
|
+
|
27
|
+
#line 1 "cgo-generated-wrapper"
|
28
|
+
|
29
|
+
|
30
|
+
/* End of preamble from import "C" comments. */
|
31
|
+
|
32
|
+
|
33
|
+
/* Start of boilerplate cgo prologue. */
|
34
|
+
#line 1 "cgo-gcc-export-header-prolog"
|
35
|
+
|
36
|
+
#ifndef GO_CGO_PROLOGUE_H
|
37
|
+
#define GO_CGO_PROLOGUE_H
|
38
|
+
|
39
|
+
typedef signed char GoInt8;
|
40
|
+
typedef unsigned char GoUint8;
|
41
|
+
typedef short GoInt16;
|
42
|
+
typedef unsigned short GoUint16;
|
43
|
+
typedef int GoInt32;
|
44
|
+
typedef unsigned int GoUint32;
|
45
|
+
typedef long long GoInt64;
|
46
|
+
typedef unsigned long long GoUint64;
|
47
|
+
typedef GoInt64 GoInt;
|
48
|
+
typedef GoUint64 GoUint;
|
49
|
+
typedef size_t GoUintptr;
|
50
|
+
typedef float GoFloat32;
|
51
|
+
typedef double GoFloat64;
|
52
|
+
#ifdef _MSC_VER
|
53
|
+
#include <complex.h>
|
54
|
+
typedef _Fcomplex GoComplex64;
|
55
|
+
typedef _Dcomplex GoComplex128;
|
56
|
+
#else
|
57
|
+
typedef float _Complex GoComplex64;
|
58
|
+
typedef double _Complex GoComplex128;
|
59
|
+
#endif
|
60
|
+
|
61
|
+
/*
|
62
|
+
static assertion to make sure the file is being used on architecture
|
63
|
+
at least with matching size of GoInt.
|
64
|
+
*/
|
65
|
+
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
|
66
|
+
|
67
|
+
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
68
|
+
typedef _GoString_ GoString;
|
69
|
+
#endif
|
70
|
+
typedef void *GoMap;
|
71
|
+
typedef void *GoChan;
|
72
|
+
typedef struct { void *t; void *v; } GoInterface;
|
73
|
+
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
|
74
|
+
|
75
|
+
#endif
|
76
|
+
|
77
|
+
/* End of boilerplate cgo prologue. */
|
78
|
+
|
79
|
+
#ifdef __cplusplus
|
80
|
+
extern "C" {
|
81
|
+
#endif
|
82
|
+
|
83
|
+
extern void printStr(char* str);
|
84
|
+
extern GoUint32 newFile();
|
85
|
+
extern GoUint32 openFile(char* filePath);
|
86
|
+
extern int newSheet(GoUint32 fileId, char* sheetNamcC);
|
87
|
+
extern void setSheetName(GoUint32 fileId, char* sheetNameC, char* targetSheetNameC);
|
88
|
+
extern str_arr* getSheetList(GoUint32 fileId);
|
89
|
+
extern char* getSheetName(GoUint32 fileId, GoInt index);
|
90
|
+
extern void closeFile(GoUint32 fileId);
|
91
|
+
extern void setSheetVisible(GoUint32 fileId, char* sheetNameC, int visible);
|
92
|
+
extern int getSheetVisible(GoUint32 fileId, char* sheetNameC);
|
93
|
+
extern void deleteSheet(GoUint32 fileId, char* sheetNameC);
|
94
|
+
extern void setCellValue(GoUint32 fileId, char* sheetNameC, int row, int col, void* value, GoInt typ);
|
95
|
+
extern char* getCellValue(GoUint32 fileId, char* sheetNameC, int row, int col);
|
96
|
+
extern struct str_arr2* getRows(GoUint32 fileId, char* sheetNameC);
|
97
|
+
extern void putRows(GoUint32 fileId, char* sheetNameC, struct str_arr2* rowsC);
|
98
|
+
extern void putRow(GoUint32 fileId, char* sheetNameC, GoInt rowIndex, str_arr* rowC);
|
99
|
+
extern void mergeCell(GoUint32 fileId, char* sheetNameC, GoInt startRow, GoInt startCol, GoInt endRow, GoInt endCol);
|
100
|
+
extern void unMergeCell(GoUint32 fileId, char* sheetNameC, GoInt startRow, GoInt startCol, GoInt endRow, GoInt endCol);
|
101
|
+
extern merge_cell_arr* getMergeCells(GoUint32 fileId, char* sheetNameC);
|
102
|
+
extern void save(GoUint32 fileId);
|
103
|
+
extern void saveAs(GoUint32 fileId, char* path);
|
104
|
+
|
105
|
+
#ifdef __cplusplus
|
106
|
+
}
|
107
|
+
#endif
|
data/ext/excel.so
ADDED
Binary file
|
data/ext/go.mod
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
module xlsx
|
2
|
+
|
3
|
+
go 1.19
|
4
|
+
|
5
|
+
require (
|
6
|
+
github.com/google/uuid v1.3.0
|
7
|
+
github.com/xuri/excelize/v2 v2.7.1
|
8
|
+
)
|
9
|
+
|
10
|
+
require (
|
11
|
+
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
12
|
+
github.com/richardlehane/mscfb v1.0.4 // indirect
|
13
|
+
github.com/richardlehane/msoleps v1.0.3 // indirect
|
14
|
+
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470 // indirect
|
15
|
+
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 // indirect
|
16
|
+
golang.org/x/crypto v0.8.0 // indirect
|
17
|
+
golang.org/x/net v0.9.0 // indirect
|
18
|
+
golang.org/x/text v0.9.0 // indirect
|
19
|
+
)
|
data/ext/go.sum
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
2
|
+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
3
|
+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
4
|
+
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
5
|
+
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
6
|
+
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
|
7
|
+
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
|
8
|
+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
9
|
+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
10
|
+
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
|
11
|
+
github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
|
12
|
+
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
|
13
|
+
github.com/richardlehane/msoleps v1.0.3 h1:aznSZzrwYRl3rLKRT3gUk9am7T/mLNSnJINvN0AQoVM=
|
14
|
+
github.com/richardlehane/msoleps v1.0.3/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
|
15
|
+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
16
|
+
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
17
|
+
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
18
|
+
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
19
|
+
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
20
|
+
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470 h1:6932x8ltq1w4utjmfMPVj09jdMlkY0aiA6+Skbtl3/c=
|
21
|
+
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
|
22
|
+
github.com/xuri/excelize/v2 v2.7.1 h1:gm8q0UCAyaTt3MEF5wWMjVdmthm2EHAWesGSKS9tdVI=
|
23
|
+
github.com/xuri/excelize/v2 v2.7.1/go.mod h1:qc0+2j4TvAUrBw36ATtcTeC1VCM0fFdAXZOmcF4nTpY=
|
24
|
+
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 h1:OAmKAfT06//esDdpi/DZ8Qsdt4+M5+ltca05dA5bG2M=
|
25
|
+
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
|
26
|
+
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
27
|
+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
28
|
+
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
29
|
+
golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ=
|
30
|
+
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
|
31
|
+
golang.org/x/image v0.5.0 h1:5JMiNunQeQw++mMOz48/ISeNu3Iweh/JaZU8ZLqHRrI=
|
32
|
+
golang.org/x/image v0.5.0/go.mod h1:FVC7BI/5Ym8R25iw5OLsgshdUBbT1h5jZTpA+mvAdZ4=
|
33
|
+
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
34
|
+
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
35
|
+
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
36
|
+
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
37
|
+
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
38
|
+
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
39
|
+
golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
|
40
|
+
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
|
41
|
+
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
42
|
+
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
43
|
+
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
44
|
+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
45
|
+
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
46
|
+
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
47
|
+
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
48
|
+
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
49
|
+
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
50
|
+
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
51
|
+
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
52
|
+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
53
|
+
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
54
|
+
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
|
55
|
+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
56
|
+
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
57
|
+
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
58
|
+
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
59
|
+
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
|
60
|
+
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
61
|
+
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
62
|
+
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
63
|
+
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
64
|
+
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
65
|
+
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
66
|
+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
67
|
+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
68
|
+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
69
|
+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
data/ext/types.h
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
typedef struct str_arr{
|
2
|
+
char **arr;
|
3
|
+
int s_size;
|
4
|
+
} str_arr;
|
5
|
+
|
6
|
+
typedef struct str_arr2 {
|
7
|
+
str_arr **arr;
|
8
|
+
int s_size;
|
9
|
+
} str_arr2;
|
10
|
+
|
11
|
+
typedef struct merge_cell {
|
12
|
+
int start_row;
|
13
|
+
int start_col;
|
14
|
+
int end_row;
|
15
|
+
int end_col;
|
16
|
+
char *val;
|
17
|
+
} merge_cell;
|
18
|
+
|
19
|
+
|
20
|
+
typedef struct merge_cell_arr {
|
21
|
+
merge_cell **cells;
|
22
|
+
int s_size;
|
23
|
+
} merge_cell_arr;
|