summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-05-21 14:49:06 +0200
committerGeremia Taglialatela <[email protected]>2023-05-21 14:49:06 +0200
commitd0092daee2723c016baa04102c7fb60ea115a646 (patch)
treee37bdae6a4be082fd3bea08fef6006fe60615f2a
parented25dade53fd5e4d74d9d171fcc62e3fc2cd68a7 (diff)
downloadcaxlsx-d0092daee2723c016baa04102c7fb60ea115a646.tar.gz
caxlsx-d0092daee2723c016baa04102c7fb60ea115a646.zip
Improve comments
- Use https where possible - Capitalize Excel
-rw-r--r--README.md2
-rw-r--r--lib/axlsx.rb4
-rw-r--r--lib/axlsx/drawing/d_lbls.rb2
-rw-r--r--lib/axlsx/drawing/hyperlink.rb4
-rw-r--r--lib/axlsx/drawing/vml_drawing.rb2
-rw-r--r--lib/axlsx/package.rb2
-rw-r--r--lib/axlsx/stylesheet/cell_style.rb2
-rw-r--r--lib/axlsx/stylesheet/num_fmt.rb2
-rw-r--r--lib/axlsx/stylesheet/styles.rb2
-rw-r--r--lib/axlsx/util/constants.rb2
-rw-r--r--lib/axlsx/workbook/workbook.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/date_time_converter.rb6
-rw-r--r--lib/axlsx/workbook/worksheet/row_breaks.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/worksheet.rb8
14 files changed, 21 insertions, 21 deletions
diff --git a/README.md b/README.md
index b57012c6..a77a99a9 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ https://github.com/caxlsx
## Synopsis
Axlsx is an Office Open XML Spreadsheet generator for the Ruby programming language.
-With Axlsx you can create excel worksheets with charts, images (with links), automated and fixed column widths, customized styles, functions, tables, conditional formatting, print options, comments, merged cells, auto filters, file and stream serialization as well as full schema validation. Axlsx excels at helping you generate beautiful Office Open XML Spreadsheet documents without having to understand the entire ECMA specification.
+With Axlsx you can create Excel worksheets with charts, images (with links), automated and fixed column widths, customized styles, functions, tables, conditional formatting, print options, comments, merged cells, auto filters, file and stream serialization as well as full schema validation. Axlsx excels at helping you generate beautiful Office Open XML Spreadsheet documents without having to understand the entire ECMA specification.
![Screen 1](https://github.com/caxlsx/caxlsx/raw/master/examples/sample.png)
diff --git a/lib/axlsx.rb b/lib/axlsx.rb
index cb7beb8c..58096e7c 100644
--- a/lib/axlsx.rb
+++ b/lib/axlsx.rb
@@ -143,7 +143,7 @@ module Axlsx
col_ref(c_index) + row_ref(r_index)
end
- # Creates an array of individual cell references based on an excel reference range.
+ # Creates an array of individual cell references based on an Excel reference range.
# @param [String] range A cell range, for example A1:D5
# @return [Array]
def self.range_to_a(range)
@@ -206,7 +206,7 @@ module Axlsx
# Instructs the serializer to not try to escape cell value input.
# This will give you a huge speed bonus, but if you content has <, > or other xml character data
- # the workbook will be invalid and excel will complain.
+ # the workbook will be invalid and Excel will complain.
def self.trust_input
@trust_input ||= false
end
diff --git a/lib/axlsx/drawing/d_lbls.rb b/lib/axlsx/drawing/d_lbls.rb
index 29697378..8965599c 100644
--- a/lib/axlsx/drawing/d_lbls.rb
+++ b/lib/axlsx/drawing/d_lbls.rb
@@ -83,7 +83,7 @@ module Axlsx
str << '</c:dLbls>'
end
- # nills out d_lbl_pos and show_leader_lines as these attributes, while valid in the spec actually chrash excel for any chart type other than pie charts.
+ # nills out d_lbl_pos and show_leader_lines as these attributes, while valid in the spec actually crash Excel for any chart type other than pie charts.
def validate_attributes_for_chart_type
return if [Pie3DChart, LineChart].include? @chart_type
diff --git a/lib/axlsx/drawing/hyperlink.rb b/lib/axlsx/drawing/hyperlink.rb
index 3fb97069..0d9eb4f7 100644
--- a/lib/axlsx/drawing/hyperlink.rb
+++ b/lib/axlsx/drawing/hyperlink.rb
@@ -15,7 +15,7 @@ module Axlsx
# @option options [String] tgtFrame Target frame for opening hyperlink
# @option options [String] invalidUrl supposedly use to store the href when we know it is an invalid resource.
# @option options [String] href the target resource this hyperlink links to. This is actually stored on the relationship.
- # @option options [String] action A string that can be used to perform specific actions. For excel please see this reference: http://msdn.microsoft.com/en-us/library/ff532419%28v=office.12%29.aspx
+ # @option options [String] action A string that can be used to perform specific actions. For Excel please see this reference: https://msdn.microsoft.com/en-us/library/ff532419%28v=office.12%29.aspx
# @option options [Boolean] endSnd terminate any sound events when processing this link
# @option options [Boolean] history include this link in the list of visited links for the applications history.
# @option options [Boolean] highlightClick indicate that the link has already been visited.
@@ -40,7 +40,7 @@ module Axlsx
alias :invalidUrl :invalid_url
alias :invalidUrl= :invalid_url=
- # An action to take when the link is clicked. The specification says "This can be used to specify a slide to be navigated to or a script of code to be run." but in most cases you will not need to do anything with this. MS does reserve a few interesting strings. @see http://msdn.microsoft.com/en-us/library/ff532419%28v=office.12%29.aspx
+ # An action to take when the link is clicked. The specification says "This can be used to specify a slide to be navigated to or a script of code to be run." but in most cases you will not need to do anything with this. MS does reserve a few interesting strings. @see https://msdn.microsoft.com/en-us/library/ff532419%28v=office.12%29.aspx
# @return [String]
attr_accessor :action
diff --git a/lib/axlsx/drawing/vml_drawing.rb b/lib/axlsx/drawing/vml_drawing.rb
index 322ec680..364ce19a 100644
--- a/lib/axlsx/drawing/vml_drawing.rb
+++ b/lib/axlsx/drawing/vml_drawing.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module Axlsx
- # a vml drawing used for comments in excel.
+ # a vml drawing used for comments in Excel.
class VmlDrawing
# creates a new Vml Drawing object.
# @param [Comments] comments the comments object this drawing is associated with
diff --git a/lib/axlsx/package.rb b/lib/axlsx/package.rb
index b4116f76..9eab87a6 100644
--- a/lib/axlsx/package.rb
+++ b/lib/axlsx/package.rb
@@ -159,7 +159,7 @@ module Axlsx
#
# If by chance you are able to create a package that does not validate it indicates that the internal
# validation is not robust enough and needs to be improved. Please report your errors to the gem author.
- # @see http://www.ecma-international.org/publications/standards/Ecma-376.htm
+ # @see https://www.ecma-international.org/publications-and-standards/standards/ecma-376/
# @example
# # The following will output any error messages found in serialization.
# p = Axlsx::Package.new
diff --git a/lib/axlsx/stylesheet/cell_style.rb b/lib/axlsx/stylesheet/cell_style.rb
index 5dc9a90d..5cdb4842 100644
--- a/lib/axlsx/stylesheet/cell_style.rb
+++ b/lib/axlsx/stylesheet/cell_style.rb
@@ -39,7 +39,7 @@ module Axlsx
# @return [Integer]
attr_reader :iLevel
- # Determines if this named style should show in the list of styles when using excel
+ # Determines if this named style should show in the list of styles when using Excel
# @return [Boolean]
attr_reader :hidden
diff --git a/lib/axlsx/stylesheet/num_fmt.rb b/lib/axlsx/stylesheet/num_fmt.rb
index 95d9a62b..4604d7bd 100644
--- a/lib/axlsx/stylesheet/num_fmt.rb
+++ b/lib/axlsx/stylesheet/num_fmt.rb
@@ -20,7 +20,7 @@ module Axlsx
serializable_attributes :formatCode, :numFmtId
# @return [String] The formatting to use for this number format.
- # @see http://support.microsoft.com/kb/264372
+ # @see https://support.microsoft.com/kb/264372
attr_reader :formatCode
# @return [Integer] An unsigned integer referencing a standard or custom number format.
diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb
index e8263b45..f67c711a 100644
--- a/lib/axlsx/stylesheet/styles.rb
+++ b/lib/axlsx/stylesheet/styles.rb
@@ -110,7 +110,7 @@ module Axlsx
# @see Styles#add_style
attr_reader :dxfs
- # The collection of table styles that will be available to the user in the excel UI
+ # The collection of table styles that will be available to the user in the Excel UI
# @return [SimpleTypedList]
# @note The recommended way to manage styles is with add_style
# @see Styles#add_style
diff --git a/lib/axlsx/util/constants.rb b/lib/axlsx/util/constants.rb
index 5ef3ece1..138c8bf0 100644
--- a/lib/axlsx/util/constants.rb
+++ b/lib/axlsx/util/constants.rb
@@ -356,7 +356,7 @@ module Axlsx
# x1F Information Separator One
#
# The following are not dealt with.
- # If you have this in your data, expect excel to blow up!
+ # If you have this in your data, expect Excel to blow up!
#
# x7F Delete
# x80 Control 0080
diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb
index 1a2f0488..2007b863 100644
--- a/lib/axlsx/workbook/workbook.rb
+++ b/lib/axlsx/workbook/workbook.rb
@@ -391,7 +391,7 @@ module Axlsx
end
# returns a range of cells in a worksheet
- # @param [String] cell_def The excel style reference defining the worksheet and cells. The range must specify the sheet to
+ # @param [String] cell_def The Excel style reference defining the worksheet and cells. The range must specify the sheet to
# retrieve the cells from. e.g. range('Sheet1!A1:B2') will return an array of four cells [A1, A2, B1, B2] while range('Sheet1!A1') will return a single Cell.
# @return [Cell, Array]
def [](cell_def)
diff --git a/lib/axlsx/workbook/worksheet/date_time_converter.rb b/lib/axlsx/workbook/worksheet/date_time_converter.rb
index ffa2831a..e34ef055 100644
--- a/lib/axlsx/workbook/worksheet/date_time_converter.rb
+++ b/lib/axlsx/workbook/worksheet/date_time_converter.rb
@@ -3,9 +3,9 @@
require "date"
module Axlsx
- # The DateTimeConverter class converts both data and time types to their apprpriate excel serializations
+ # The DateTimeConverter class converts both data and time types to their apprpriate Excel serializations
class DateTimeConverter
- # The date_to_serial method converts Date objects to the equivelant excel serialized forms
+ # The date_to_serial method converts Date objects to the equivelant Excel serialized forms
# @param [Date] date the date to be serialized
# @return [Numeric]
def self.date_to_serial(date)
@@ -14,7 +14,7 @@ module Axlsx
(offset_date - epoch).to_f
end
- # The time_to_serial methond converts a Time object its excel serialized form.
+ # The time_to_serial methond converts a Time object its Excel serialized form.
# @param [Time] time the time to be serialized
# @return [Numeric]
def self.time_to_serial(time)
diff --git a/lib/axlsx/workbook/worksheet/row_breaks.rb b/lib/axlsx/workbook/worksheet/row_breaks.rb
index 56e8c4c6..21691f7a 100644
--- a/lib/axlsx/workbook/worksheet/row_breaks.rb
+++ b/lib/axlsx/workbook/worksheet/row_breaks.rb
@@ -13,7 +13,7 @@ module Axlsx
# max and man values are fixed.
# @see Break
def add_break(options)
- # force feed the excel default
+ # force feed the Excel default
self << Break.new(options.merge(:max => 16383, :man => true))
last
end
diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb
index c76300f2..f4dd71a1 100644
--- a/lib/axlsx/workbook/worksheet/worksheet.rb
+++ b/lib/axlsx/workbook/worksheet/worksheet.rb
@@ -65,7 +65,7 @@ module Axlsx
# Specifies the visible state of this sheet. Allowed states are
# :visible, :hidden or :very_hidden. The default value is :visible.
#
- # Worksheets in the :hidden state can be shown using the sheet formatting properties in excel.
+ # Worksheets in the :hidden state can be shown using the sheet formatting properties in Excel.
# :very_hidden sheets should be inaccessible to end users.
# @param [Symbol] sheet_state The visible state for this sheet.
def state=(sheet_state)
@@ -173,7 +173,7 @@ module Axlsx
@rows.transpose(&block)
end
- # A range that excel will apply an auto-filter to "A1:B3"
+ # A range that Excel will apply an auto-filter to "A1:B3"
# This will turn filtering on for the cells in the range.
# The first row is considered the header, while subsequent rows are considered to be data.
# @return String
@@ -519,7 +519,7 @@ module Axlsx
end
# Adds a page break (row break) to the worksheet
- # @param cell A Cell object or excel style string reference indicating where the break
+ # @param cell A Cell object or Excel style string reference indicating where the break
# should be added to the sheet.
# @example
# ws.add_page_break("A4")
@@ -661,7 +661,7 @@ module Axlsx
r
end
- # Returns the cell or cells defined using excel style A1:B3 references.
+ # Returns the cell or cells defined using Excel style A1:B3 references.
# @param [String|Integer] cell_def the string defining the cell or range of cells, or the rownumber
# @return [Cell, Array]
def [](cell_def)