xlsxwriter 0.0.3 → 0.0.4.pre.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/xlsxwriter/libxlsxwriter/{LICENSE.txt → License.txt} +64 -3
- data/ext/xlsxwriter/libxlsxwriter/Makefile +42 -7
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/app.h +2 -2
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/chart.h +2481 -97
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/common.h +41 -2
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/core.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/format.h +5 -5
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/packager.h +8 -3
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/styles.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/utility.h +1 -0
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/workbook.h +2 -2
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/worksheet.h +381 -1
- data/ext/xlsxwriter/libxlsxwriter/src/Makefile +25 -5
- data/ext/xlsxwriter/libxlsxwriter/src/app.c +17 -13
- data/ext/xlsxwriter/libxlsxwriter/src/chart.c +3903 -976
- data/ext/xlsxwriter/libxlsxwriter/src/content_types.c +18 -14
- data/ext/xlsxwriter/libxlsxwriter/src/core.c +9 -9
- data/ext/xlsxwriter/libxlsxwriter/src/format.c +2 -2
- data/ext/xlsxwriter/libxlsxwriter/src/packager.c +179 -95
- data/ext/xlsxwriter/libxlsxwriter/src/relationships.c +11 -8
- data/ext/xlsxwriter/libxlsxwriter/src/shared_strings.c +2 -0
- data/ext/xlsxwriter/libxlsxwriter/src/styles.c +10 -8
- data/ext/xlsxwriter/libxlsxwriter/src/utility.c +18 -1
- data/ext/xlsxwriter/libxlsxwriter/src/workbook.c +41 -25
- data/ext/xlsxwriter/libxlsxwriter/src/worksheet.c +672 -42
- data/ext/xlsxwriter/libxlsxwriter/third_party/minizip/Makefile +6 -1
- data/lib/xlsxwriter/version.rb +1 -1
- data/lib/xlsxwriter/worksheet.rb +11 -5
- metadata +6 -6
@@ -9,7 +9,7 @@ ifdef V
|
|
9
9
|
Q=
|
10
10
|
endif
|
11
11
|
|
12
|
-
UNAME := $(shell uname)
|
12
|
+
UNAME := $(shell uname -sr)
|
13
13
|
|
14
14
|
# Check for MinGW/MinGW64/Cygwin environments.
|
15
15
|
ifneq (,$(findstring MINGW, $(UNAME)))
|
@@ -32,6 +32,11 @@ CC = gcc
|
|
32
32
|
CFLAGS += -DUSE_FILE32API
|
33
33
|
endif
|
34
34
|
|
35
|
+
# Fix for modified zconf.h on Gentoo.
|
36
|
+
ifneq (,$(findstring gentoo, $(UNAME)))
|
37
|
+
CFLAGS += -DOF=_Z_OF
|
38
|
+
endif
|
39
|
+
|
35
40
|
all: ioapi.o zip.o ioapi.so zip.so
|
36
41
|
|
37
42
|
%.o : %.c
|
data/lib/xlsxwriter/version.rb
CHANGED
data/lib/xlsxwriter/worksheet.rb
CHANGED
@@ -11,7 +11,10 @@ class XlsxWriter::Worksheet
|
|
11
11
|
# In the latter case they are applied to all cells in the +row+.
|
12
12
|
#
|
13
13
|
# +height+ is a Numeric that specifies the row height.
|
14
|
-
|
14
|
+
#
|
15
|
+
# If +skip_empty+ is set to +true+ empty cells are not added to the sheet.
|
16
|
+
# Otherwise they are added with type +:blank+.
|
17
|
+
def add_row(row, style: nil, height: nil, types: nil, skip_empty: false)
|
15
18
|
row_idx = @current_row ||= 0
|
16
19
|
@current_row += 1
|
17
20
|
|
@@ -36,6 +39,8 @@ class XlsxWriter::Worksheet
|
|
36
39
|
write_boolean(row_idx, idx, value, cell_style)
|
37
40
|
when :blank
|
38
41
|
write_blank(row_idx, idx, cell_style)
|
42
|
+
when :skip, :empty
|
43
|
+
# write nothing
|
39
44
|
when nil
|
40
45
|
case value
|
41
46
|
when Numeric
|
@@ -43,7 +48,7 @@ class XlsxWriter::Worksheet
|
|
43
48
|
when TrueClass, FalseClass
|
44
49
|
write_boolean(row_idx, idx, value, cell_style)
|
45
50
|
when '', nil
|
46
|
-
write_blank(row_idx, idx, cell_style)
|
51
|
+
write_blank(row_idx, idx, cell_style) unless skip_empty
|
47
52
|
when /\A=/
|
48
53
|
write_formula(row_idx, idx, value, cell_style)
|
49
54
|
else
|
@@ -59,11 +64,11 @@ class XlsxWriter::Worksheet
|
|
59
64
|
else
|
60
65
|
raise ArgumentError, "Unknown cell type #{cell_type}."
|
61
66
|
end
|
67
|
+
end
|
62
68
|
|
63
|
-
|
69
|
+
set_row(row_idx, height: height) if height
|
64
70
|
|
65
|
-
|
66
|
-
end
|
71
|
+
nil
|
67
72
|
end
|
68
73
|
|
69
74
|
# Apply cols automatic widths calculated by #add_row.
|
@@ -79,6 +84,7 @@ class XlsxWriter::Worksheet
|
|
79
84
|
def update_col_auto_width(idx, val, format)
|
80
85
|
font_scale = (@workbook.font_sizes[format] || 11) / 10.0
|
81
86
|
width = (val.count(THIN_CHARS) + 3) * font_scale
|
87
|
+
width = 255 if width > 255 # Max xlsx column width is 255 characters
|
82
88
|
@col_auto_widths[idx] = [@col_auto_widths[idx], width].compact.max
|
83
89
|
end
|
84
90
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xlsxwriter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick H
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -65,7 +65,7 @@ files:
|
|
65
65
|
- ext/xlsxwriter/extconf.rb
|
66
66
|
- ext/xlsxwriter/format.c
|
67
67
|
- ext/xlsxwriter/format.h
|
68
|
-
- ext/xlsxwriter/libxlsxwriter/
|
68
|
+
- ext/xlsxwriter/libxlsxwriter/License.txt
|
69
69
|
- ext/xlsxwriter/libxlsxwriter/Makefile
|
70
70
|
- ext/xlsxwriter/libxlsxwriter/include/xlsxwriter.h
|
71
71
|
- ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/app.h
|
@@ -192,12 +192,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
192
192
|
version: '0'
|
193
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
194
194
|
requirements:
|
195
|
-
- - "
|
195
|
+
- - ">"
|
196
196
|
- !ruby/object:Gem::Version
|
197
|
-
version:
|
197
|
+
version: 1.3.1
|
198
198
|
requirements: []
|
199
199
|
rubyforge_project:
|
200
|
-
rubygems_version: 2.6.
|
200
|
+
rubygems_version: 2.6.14
|
201
201
|
signing_key:
|
202
202
|
specification_version: 4
|
203
203
|
summary: Ruby interface to libxlsxwriter
|