Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xuri
excelize
提交
10883023
excelize
项目概览
xuri
/
excelize
通知
13
Star
2
Fork
4
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
excelize
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
10883023
编写于
5月 16, 2023
作者:
xurime
提交者:
GitHub
5月 16, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
This closes #1535, add documentation for the fields for style alignment
上级
49234fb9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
35 addition
and
3 deletion
+35
-3
styles.go
styles.go
+35
-3
未找到文件。
styles.go
浏览文件 @
10883023
...
...
@@ -162,9 +162,11 @@ func parseFormatStyleSet(style *Style) (*Style, error) {
return
style
,
err
}
// NewStyle provides a function to create the style for cells by given style
// options. This function is concurrency safe. Note that the 'Font.Color' field
// uses an RGB color represented in 'RRGGBB' hexadecimal notation.
// NewStyle provides a function to create the style for cells by a given style
// options, and returns style index. The same style index can not be used
// across different workbook. This function is concurrency safe. Note that
// the 'Font.Color' field uses an RGB color represented in 'RRGGBB' hexadecimal
// notation.
//
// The following table shows the border types used in 'Border.Type' supported by
// excelize:
...
...
@@ -236,6 +238,18 @@ func parseFormatStyleSet(style *Style) (*Style, error) {
// 8 | darkUp | 18 | gray0625
// 9 | darkGrid | |
//
// The 'Alignment.Indent' is an integer value, where an increment of 1
// represents 3 spaces. Indicates the number of spaces (of the normal style
// font) of indentation for text in a cell. The number of spaces to indent is
// calculated as following:
//
// Number of spaces to indent = indent value * 3
//
// For example, an indent value of 1 means that the text begins 3 space widths
// (of the normal style font) from the edge of the cell. Note: The width of one
// space character is defined by the font. Only left, right, and distributed
// horizontal alignments are supported.
//
// The following table shows the type of cells' horizontal alignment used
// in 'Alignment.Horizontal':
//
...
...
@@ -259,6 +273,24 @@ func parseFormatStyleSet(style *Style) (*Style, error) {
// justify
// distributed
//
// The 'Alignment.ReadingOrder' is an uint64 value indicating whether the
// reading order of the cell is left-to-right, right-to-left, or context
// dependent. the valid value of this field was:
//
// Value | Description
// -------+----------------------------------------------------
// 0 | Context Dependent - reading order is determined by scanning the
// | text for the first non-whitespace character: if it is a strong
// | right-to-left character, the reading order is right-to-left;
// | otherwise, the reading order left-to-right.
// 1 | Left-to-Right: reading order is left-to-right in the cell, as in
// | English.
// 2 | Right-to-Left: reading order is right-to-left in the cell, as in
// | Hebrew.
//
// The 'Alignment.RelativeIndent' is an integer value to indicate the additional
// number of spaces of indentation to adjust for text in a cell.
//
// The following table shows the type of font underline style used in
// 'Font.Underline':
//
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录