easy_sheet_io 0.4.6.2 → 0.4.7.1
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 +4 -4
- data/lib/easy_sheet_io/version.rb +1 -1
- data/lib/easy_sheet_io.rb +7 -3
- data/lib/to_csv.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a53b3053320aed73cc23e53314ddbad656a0d7567f9012a4bf1388c7e44958c0
|
4
|
+
data.tar.gz: 971ad3bfc3a5211493c31886a5487f5f19a4ddda8b7a71a5be3c4a6cf10d2761
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b24c4ffdb2c549ab9457362c0d16234808f3b98e8140e1a656771749203aee0fd2d8aafd90590c98ffc19358eda892cc45e4887702884560c92cc7950101a75
|
7
|
+
data.tar.gz: 952d816e49b326fb3b266a5ae00ff4d649b337e080451ca348068975b333384f311b59471db41084cdee584746e43fd9a88c34b2b91b6ec94834eb5147d1f875
|
data/lib/easy_sheet_io.rb
CHANGED
@@ -44,7 +44,7 @@ module EasySheetIo
|
|
44
44
|
# Converting Encode and Setting index.. rover not supported yet
|
45
45
|
if format.to_s == "daru" || format.nil?
|
46
46
|
ans.convert_enc!(from: encoding, to: "utf-8")
|
47
|
-
ans.set_index! if index
|
47
|
+
ans.set_index!(index) if index
|
48
48
|
end
|
49
49
|
|
50
50
|
return ans
|
@@ -53,7 +53,7 @@ module EasySheetIo
|
|
53
53
|
|
54
54
|
# ##Generate Array from EXCEL File, and convert it to Hash or DataFrame.
|
55
55
|
# **opt candidate= line_from: 1, header: 0)
|
56
|
-
def read_excel(path, sheet_i: 0, format: :daru, encoding: "utf-8", **opt)
|
56
|
+
def read_excel(path, sheet_i: 0, format: :daru, encoding: "utf-8", index: nil, **opt)
|
57
57
|
a2d = open_excel(path, sheet_i, encoding: encoding) # Get 2D Array
|
58
58
|
|
59
59
|
if format.to_s == "array"
|
@@ -61,7 +61,11 @@ module EasySheetIo
|
|
61
61
|
elsif format.to_s == "hash"
|
62
62
|
return to_hash(a2d, **opt)
|
63
63
|
else # include format.nil?
|
64
|
-
|
64
|
+
ans = to_df(to_hash(a2d, **opt), format: format)
|
65
|
+
if format.to_s == "daru" || format.nil?
|
66
|
+
ans.set_index!(index) if index
|
67
|
+
end
|
68
|
+
return ans
|
65
69
|
end
|
66
70
|
end
|
67
71
|
|
data/lib/to_csv.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_sheet_io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- show-o-atakun
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daru
|