write_xlsx 1.08.1 → 1.09.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +10 -0
- data/Changes +17 -0
- data/README.md +1 -1
- data/examples/background.rb +19 -0
- data/examples/ignore_errors.rb +39 -0
- data/examples/keep_leading_zeros.rb +17 -0
- data/lib/write_xlsx/chart/axis.rb +3 -3
- data/lib/write_xlsx/chart/scatter.rb +0 -15
- data/lib/write_xlsx/chart/series.rb +1 -1
- data/lib/write_xlsx/chart.rb +28 -28
- data/lib/write_xlsx/chartsheet.rb +3 -3
- data/lib/write_xlsx/drawing.rb +39 -39
- data/lib/write_xlsx/format.rb +11 -179
- data/lib/write_xlsx/package/app.rb +2 -2
- data/lib/write_xlsx/package/button.rb +8 -8
- data/lib/write_xlsx/package/comments.rb +8 -8
- data/lib/write_xlsx/package/content_types.rb +18 -9
- data/lib/write_xlsx/package/core.rb +5 -5
- data/lib/write_xlsx/package/custom.rb +2 -2
- data/lib/write_xlsx/package/metadata.rb +159 -0
- data/lib/write_xlsx/package/packager.rb +21 -0
- data/lib/write_xlsx/package/shared_strings.rb +6 -6
- data/lib/write_xlsx/package/styles.rb +11 -11
- data/lib/write_xlsx/package/table.rb +23 -23
- data/lib/write_xlsx/package/theme.rb +1 -1
- data/lib/write_xlsx/package/vml.rb +43 -43
- data/lib/write_xlsx/shape.rb +17 -15
- data/lib/write_xlsx/sparkline.rb +340 -340
- data/lib/write_xlsx/utility.rb +4 -23
- data/lib/write_xlsx/version.rb +1 -1
- data/lib/write_xlsx/workbook.rb +171 -644
- data/lib/write_xlsx/worksheet/cell_data.rb +25 -3
- data/lib/write_xlsx/worksheet/data_validation.rb +20 -20
- data/lib/write_xlsx/worksheet/hyperlink.rb +4 -4
- data/lib/write_xlsx/worksheet/page_setup.rb +12 -12
- data/lib/write_xlsx/worksheet.rb +267 -4144
- data/test/perl_output/background.xlsx +0 -0
- data/test/perl_output/ignore_errors.xlsx +0 -0
- data/test/perl_output/keep_leading_zeros.xlsx +0 -0
- data/test/perl_output/multi_line.xlsx +0 -0
- data/test/regression/images/logo.gif +0 -0
- data/test/regression/images/logo.jpg +0 -0
- data/test/regression/images/red.gif +0 -0
- data/test/regression/test_background01.rb +23 -0
- data/test/regression/test_background02.rb +23 -0
- data/test/regression/test_background03.rb +24 -0
- data/test/regression/test_background04.rb +25 -0
- data/test/regression/test_background05.rb +25 -0
- data/test/regression/test_background06.rb +31 -0
- data/test/regression/test_background07.rb +37 -0
- data/test/regression/test_chart_axis47.rb +52 -0
- data/test/regression/test_chart_axis48.rb +53 -0
- data/test/regression/test_dynamic_array01.rb +25 -0
- data/test/regression/test_image56.rb +23 -0
- data/test/regression/test_image57.rb +23 -0
- data/test/regression/test_set_column10.rb +55 -0
- data/test/regression/test_set_column11.rb +48 -0
- data/test/regression/test_set_row01.rb +35 -0
- data/test/regression/test_set_row02.rb +35 -0
- data/test/regression/test_set_row03.rb +35 -0
- data/test/regression/test_set_row04.rb +35 -0
- data/test/regression/xlsx_files/background01.xlsx +0 -0
- data/test/regression/xlsx_files/background02.xlsx +0 -0
- data/test/regression/xlsx_files/background03.xlsx +0 -0
- data/test/regression/xlsx_files/background04.xlsx +0 -0
- data/test/regression/xlsx_files/background05.xlsx +0 -0
- data/test/regression/xlsx_files/background06.xlsx +0 -0
- data/test/regression/xlsx_files/background07.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis47.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis48.xlsx +0 -0
- data/test/regression/xlsx_files/dynamic_array01.xlsx +0 -0
- data/test/regression/xlsx_files/image56.xlsx +0 -0
- data/test/regression/xlsx_files/image57.xlsx +0 -0
- data/test/regression/xlsx_files/set_row01.xlsx +0 -0
- data/test/regression/xlsx_files/set_row03.xlsx +0 -0
- data/test/test_example_match.rb +73 -0
- data/test/worksheet/test_pixels_to_row_col.rb +46 -0
- metadata +86 -2
data/lib/write_xlsx/utility.rb
CHANGED
@@ -108,20 +108,6 @@ module Writexlsx
|
|
108
108
|
# The function takes a date and time in ISO8601 "yyyy-mm-ddThh:mm:ss.ss" format
|
109
109
|
# and converts it to a decimal number representing a valid Excel date.
|
110
110
|
#
|
111
|
-
# Dates and times in Excel are represented by real numbers. The integer part of
|
112
|
-
# the number stores the number of days since the epoch and the fractional part
|
113
|
-
# stores the percentage of the day in seconds. The epoch can be either 1900 or
|
114
|
-
# 1904.
|
115
|
-
#
|
116
|
-
# Parameter: Date and time string in one of the following formats:
|
117
|
-
# yyyy-mm-ddThh:mm:ss.ss # Standard
|
118
|
-
# yyyy-mm-ddT # Date only
|
119
|
-
# Thh:mm:ss.ss # Time only
|
120
|
-
#
|
121
|
-
# Returns:
|
122
|
-
# A decimal number representing a valid Excel date, or
|
123
|
-
# nil if the date is invalid.
|
124
|
-
#
|
125
111
|
def convert_date_time(date_time_string) #:nodoc:
|
126
112
|
date_time = date_time_string.to_s.sub(/^\s+/, '').sub(/\s+$/, '').sub(/Z$/, '')
|
127
113
|
|
@@ -352,11 +338,6 @@ module Writexlsx
|
|
352
338
|
# Check that row and col are valid and store max and min values for use in
|
353
339
|
# other methods/elements.
|
354
340
|
#
|
355
|
-
# The ignore_row/ignore_col flags is used to indicate that we wish to
|
356
|
-
# perform the dimension check without storing the value.
|
357
|
-
#
|
358
|
-
# The ignore flags are use by set_row() and data_validate.
|
359
|
-
#
|
360
341
|
def check_dimensions_and_update_max_min_values(row, col, ignore_row = 0, ignore_col = 0) #:nodoc:
|
361
342
|
check_dimensions(row, col)
|
362
343
|
store_row_max_min_values(row) if ignore_row == 0
|
@@ -486,9 +467,9 @@ module Writexlsx
|
|
486
467
|
|
487
468
|
def v_shape_attributes_base(id, z_index)
|
488
469
|
[
|
489
|
-
['id',
|
490
|
-
['type',
|
491
|
-
['style',
|
470
|
+
['id', "_x0000_s#{id}"],
|
471
|
+
['type', type],
|
472
|
+
['style', (v_shape_style_base(z_index, vertices) + style_addition).join]
|
492
473
|
]
|
493
474
|
end
|
494
475
|
|
@@ -943,7 +924,7 @@ module Writexlsx
|
|
943
924
|
else
|
944
925
|
@writer.empty_tag(tag, attributes)
|
945
926
|
end
|
946
|
-
|
927
|
+
end
|
947
928
|
|
948
929
|
#
|
949
930
|
# Convert the user specified colour index or string to a rgb colour.
|
data/lib/write_xlsx/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
WriteXLSX_VERSION = "1.
|
1
|
+
WriteXLSX_VERSION = "1.09.2"
|