invzhi
Repos
18
Followers
46
Following
117

❄️ Set next value to fields when creating with GORM.

0
0

👌 LeetCode Problems' Solutions

76
13

:art: A command-line tool to generate GIF which can display sorting algorithm

37
2

:snake: Terminal-based snake game

C
1
0

Events

create tag
invzhi create tag v1.1.1
Created at 12 hours ago

.github/workflow/test.yml: verbose step name with version

Improve error handling by db.AddError

Created at 13 hours ago

.github/workflow/test.yml: compatibility with gorm

Created at 23 hours ago

README.md: add codecov badge

Created at 23 hours ago

Add test.yml for GitHub Actions

Created at 23 hours ago

Add golangci-lint.yml for GitHub Actions

Created at 23 hours ago

README.md: add Go Report Card

Created at 1 day ago
create tag
invzhi create tag v1.1.0
Created at 1 day ago

Compatible with gorm since v1.23.0

Created at 1 day ago

Add SetFields to customize fields

Created at 2 weeks ago
Created at 3 weeks ago
started
Created at 3 weeks ago
Created at 3 weeks ago
started
Created at 4 weeks ago
Created at 1 month ago
create tag
invzhi create tag v1.0.0
Created at 1 month ago

README.md: add badge and usage

Created at 1 month ago

Introducing package next

Created at 1 month ago
create branch
invzhi create branch main
Created at 1 month ago
create repository
invzhi create repository
Created at 1 month ago
Created at 1 month ago
started
Created at 2 months ago
issue comment
Apply Row Style in StreamWriter

@xuri Done.

Created at 2 months ago

This closes #1354, stream writer will apply style in RowOpts for each cell

Created at 2 months ago
Created at 2 months ago
pull request opened
Apply Row Style in StreamWriter

PR Details

Apply Row Style to Cell also in *StreamWriter.SetRow. Example:

w.SetRow("A1", []interface{}{"value1"}, excelize.RowOpts{StyleID: styleID})

Description

For *StreamWriter.SetRow, apply StyleID in RowOpt. But when the type of value is Cell or *Cell, apply cell.StyleID. The cell style priority is higher than the rows.

Related Issue

#1354

Motivation and Context

Before this change, the stream writer won't apply the style of each cell when you specify the row style.

How Has This Been Tested

See also TestSetRowWithStyle.

Types of changes

  • [ ] Docs change / refactoring / dependency upgrade
  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.
  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.
Created at 2 months ago

This closes #1354, stream writer will apply style in RowOpts for each cell

Created at 2 months ago
Created at 2 months ago
issue comment
StreamWriter couldn't set row style by `RowOpt`

Thanks for your quick response. I would like to open a pull request to fix this issue.

I have a question about the expected behavior.

When I specify the style like this:

w.SetRow("A1", []interface{}{excelize.Cell{StyleID: 0, Value: "value1"}}, excelize.RowOpts{StyleID: styleID})

The style id of A1 should be:

  1. overridden by 0
  2. still use styleID in excelize.RowOpts?

My understanding is that the first is the expected behavior, which the developers could unset the cell style.

Created at 2 months ago
Created at 2 months ago