Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: qax-os/excelize
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.4.1
Choose a base ref
...
head repository: qax-os/excelize
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.0.0
Choose a head ref

Commits on Jan 5, 2019

  1. Copy the full SHA
    969f4e2 View commit details

Commits on Jan 6, 2019

  1. Copy the full SHA
    034de7a View commit details
  2. Merge pull request #330 from zhangleijlu/master

    Resolve #318, add new functions `SetPageLayout` and `GetPageLayout`
    xuri authored Jan 6, 2019
    Copy the full SHA
    055d3fa View commit details

Commits on Jan 9, 2019

  1. Copy the full SHA
    5dd00b9 View commit details

Commits on Jan 10, 2019

  1. Merge pull request #332 from mmitton/331_style_fill

    Do not create a blank fill if no fill is specified in the style format
    xuri authored Jan 10, 2019
    Copy the full SHA
    b0ed4c1 View commit details
  2. New feature: File.DuplicateRowTo() duplicate row to specified row pos…

    …ition.
    
    DuplicateRowTo() is similar to DuplicateRow() but copies specified row not just after specified source row
    but to any other specified position below or above source row.
    
    Also I made minor modifications of tests: using filepath.Join() instead of direct unix-way paths strings
    to avoid possible tests fails on other OS.
    albenik committed Jan 10, 2019
    Copy the full SHA
    725c1a0 View commit details

Commits on Jan 11, 2019

  1. Merge pull request #334 from albenik/duplicate_row

    Resolve #333 New feature: File.DuplicateRowTo() duplicate row to a specified row position
    xuri authored Jan 11, 2019
    Copy the full SHA
    7f1323f View commit details

Commits on Jan 13, 2019

  1. Copy the full SHA
    81948d9 View commit details

Commits on Jan 17, 2019

  1. Merge pull request #337 from kkxkkxkkgh/paper-size

    The function SetPageLayout support set paper size
    xuri authored Jan 17, 2019
    Copy the full SHA
    0c5c99e View commit details

Commits on Jan 23, 2019

  1. Copy the full SHA
    daf32a3 View commit details

Commits on Jan 24, 2019

  1. Merge pull request #340 from rentiansheng/datavalidation_formula_error

    fix: datavalidation list error, formula > 255 issue #339
    xuri authored Jan 24, 2019
    Copy the full SHA
    36fc39f View commit details

Commits on Jan 29, 2019

  1. Update readme

    xuri committed Jan 29, 2019
    Copy the full SHA
    b7b925c View commit details

Commits on Feb 2, 2019

  1. Faster TitleToNumber (#343)

    * TestTitleToNumber: more test cases
    
    * TitleToNumber: drop use of math.Pow()
    
    Compute using pure integers
    
    * TitleToNumber: simplify
    
    Remove unecessary casts to int
    dolmen authored and xuri committed Feb 2, 2019
    Copy the full SHA
    e780e41 View commit details

Commits on Feb 22, 2019

  1. Copy the full SHA
    0072bb7 View commit details

Commits on Feb 23, 2019

  1. Copy the full SHA
    c223815 View commit details

Commits on Feb 24, 2019

  1. Copy the full SHA
    1427027 View commit details

Commits on Feb 25, 2019

  1. Copy the full SHA
    1aed1d7 View commit details

Commits on Feb 26, 2019

  1. Copy the full SHA
    f66212d View commit details

Commits on Mar 6, 2019

  1. Implement consistent row addressing by Excel row number starting with…

    … 1 (#350)
    
    * Implement consistent row addressing by Excel row number starting with 1
    
    1. Added second versions for all row manipulation methods with zero-based row addressing.
    2. Fixed methods documentation to explicitly describe which row addressing used in method.
    3. Added WARNING to README.md.
    4. Cosmetic change: All row test moved to file `rows_test.go`.
    
    * TravisCI: go1.12 added to tests matrix
    
    * BACKWARD INCOMPARTIBLE: Use only Excel numbering logic from 1 row
    
    * README updated
    albenik authored and xuri committed Mar 6, 2019
    Copy the full SHA
    12c1e24 View commit details

Commits on Mar 7, 2019

  1. update README and functions docs (#351)

    * update README and functions docs
    
    * update README and functions docs
    Kimxu authored and xuri committed Mar 7, 2019
    Copy the full SHA
    164a3e1 View commit details
  2. Copy the full SHA
    b974df4 View commit details
  3. Merge pull request #352 from caozhiyi/master

    update go test and function docs
    xuri authored Mar 7, 2019
    Copy the full SHA
    092f16c View commit details

Commits on Mar 19, 2019

  1. Huge refactorig for consistent col/row numbering (#356)

    * Huge refactorig for consistent col/row numbering
    
    Started from simply changing ToALphaString()/TitleToNumber() logic and related fixes.
    But have to go deeper, do fixes, after do related fixes and again and again.
    
    Major improvements:
    
    1. Tests made stronger again (But still be weak).
    2. "Empty" returns for incorrect input replaces with panic.
    3. Check for correct col/row/cell naming & addressing by default.
    4. Removed huge amount of duplicated code.
    5. Removed ToALphaString(), TitleToNumber() and it helpers functions at all,
    and replaced with SplitCellName(), JoinCellName(), ColumnNameToNumber(), ColumnNumberToName(), CellNameToCoordinates(), CoordinatesToCellName().
    6. Minor fixes for internal variable naming for code readability (ex. col, row for input params, colIdx, rowIdx for slice indexes etc).
    
    * Formatting fixes
    albenik authored and xuri committed Mar 19, 2019
    Copy the full SHA
    dc01264 View commit details

Commits on Mar 20, 2019

  1. Typo fixed and godoc updated

    xuri committed Mar 20, 2019
    Copy the full SHA
    beff7b4 View commit details
  2. resolve #360, fix axis parse issue when add / get pictures;

    typo fixed and go test updated
    xuri committed Mar 20, 2019
    Copy the full SHA
    40ea8eb View commit details

Commits on Mar 21, 2019

  1. SetCellFloat for floats with specific precision (#361)

    This allows the user to set a floating point value into a
    cell with a specific number of places after the decimal.
    
    Closes #357
    mlh758 authored and xuri committed Mar 21, 2019
    Copy the full SHA
    b2c12d7 View commit details
  2. Copy the full SHA
    70b1a29 View commit details
  3. Copy the full SHA
    7d197c6 View commit details

Commits on Mar 22, 2019

  1. resolve #366 fix image duplication

    xuri committed Mar 22, 2019
    Copy the full SHA
    677a22d View commit details

Commits on Mar 23, 2019

  1. Add benchmark for adding images to sheet (#367)

    * Add benchmark for adding images to sheet
    
    This should help track performance regressions in future changes.
    
    * Only transform sheet name if necessary
    mlh758 authored and xuri committed Mar 23, 2019
    Copy the full SHA
    2874d75 View commit details
  2. refactor: handler error instead of panic,

    Exported functions:
    
    SetCellStyle
    InsertCol
    RemoveCol
    RemoveRow
    InsertRow
    DuplicateRow
    DuplicateRowTo
    SetRowHeight
    GetRowHeight
    GetCellValue
    GetCellFormula
    GetCellHyperLink
    SetCellHyperLink
    SetCellInt
    SetCellBool
    SetCellFloat
    SetCellStr
    SetCellDefault
    GetCellStyle
    SetCellValue
    MergeCell
    SetSheetRow
    SetRowVisible
    GetRowVisible
    SetRowOutlineLevel
    GetRowOutlineLevel
    GetRows
    Columns
    SearchSheet
    AddTable
    GetPicture
    AutoFilter
    GetColVisible
    SetColVisible
    GetColOutlineLevel
    SetColOutlineLevel
    SetColWidth
    GetColWidth
    
    inner functions:
    
    adjustHelper
    adjustMergeCells
    adjustAutoFilter
    prepareCell
    setDefaultTimeStyle
    timeToExcelTime
    addDrawingChart
    addDrawingVML
    addDrawingPicture
    getTotalRowsCols
    checkRow
    addDrawingShape
    addTable
    xuri committed Mar 23, 2019
    Copy the full SHA
    40ff5dc View commit details

Commits on Mar 24, 2019

  1. Copy the full SHA
    f0244c0 View commit details

Commits on Mar 25, 2019

  1. Do not save duplicate images

    Adding the same image should create a drawing referencing the
    already stored copy of the image.
    
    Closes #359
    mlh758 authored and Harris committed Mar 25, 2019
    Copy the full SHA
    a94dcb9 View commit details

Commits on Mar 26, 2019

  1. resolve #359, optimize for saving duplicate images

    Do not save duplicate images
    xuri authored Mar 26, 2019
    Copy the full SHA
    eca6618 View commit details

Commits on Apr 4, 2019

  1. Fixed bug in column cell to check.

    The target cell for calclator the width was shifted by 1.
    yoshhiide committed Apr 4, 2019
    Copy the full SHA
    28c02e3 View commit details
  2. Fixed bug in the calculation target cell(row).

    The target cell for calclator the height was shifted by 1.
    yoshhiide committed Apr 4, 2019
    Copy the full SHA
    b0acd92 View commit details
  3. Adjust coding style

    yoshhiide committed Apr 4, 2019
    Copy the full SHA
    8134197 View commit details

Commits on Apr 7, 2019

  1. Copy the full SHA
    4e7d93a View commit details

Commits on Apr 9, 2019

  1. Fix out of range panic when removing formula.

    Fix file corruption issue when deleting a sheet containing a formula.
    aplulu committed Apr 9, 2019
    Copy the full SHA
    841ff4a View commit details

Commits on Apr 12, 2019

  1. Merge pull request #379 from yoshhiide/bug-calc-position-object

    fix calc object position  for addPicture
    xuri authored Apr 12, 2019
    Copy the full SHA
    8fff533 View commit details

Commits on Apr 13, 2019

  1. Merge pull request #381 from aplulu/fix_calcchain

    Fix two bugs related to Formula
    xuri authored Apr 13, 2019
    Copy the full SHA
    031ae30 View commit details

Commits on Apr 14, 2019

  1. Copy the full SHA
    c423617 View commit details

Commits on Apr 15, 2019

  1. Resolve #369,#370

    add error return value
    
    exported functions:
    
    GetMergeCells
    ProtectSheet
    UnprotectSheet
    UpdateLinkedValue
    GetMergeCells
    SetSheetVisible
    
    inner functions:
    
    workSheetReader
    copySheet
    xuri committed Apr 15, 2019
    Copy the full SHA
    f2df344 View commit details

Commits on Apr 16, 2019

  1. add unit tests to functions

    xuri committed Apr 16, 2019
    Copy the full SHA
    a88459d View commit details
  2. Resolve #382, rewrite prepareSheetXML to scale linearly (#383)

    * Rewrite prepareSheetXML to scale linearly
    
    We don't need to backfill columns into every row for most purposes
    Provided makeContiguousColumns for setting styles where we do
    need it for a specific region.
    
    Added a benchmark to monitor progress. For 50,000 rows this went
    from about 11 seconds to 1 second. The improvements are more
    dramatic as the row/column count increases.
    
    * Assigning that row value was redundant
    mlh758 authored and xuri committed Apr 16, 2019
    Copy the full SHA
    0f9170a View commit details

Commits on Apr 20, 2019

  1. godoc update and typo fixed

    xuri committed Apr 20, 2019
    Copy the full SHA
    0660f30 View commit details
  2. Add a check for maximum limit hyperlinks in a worksheet

    typo fixed
    xuri committed Apr 20, 2019
    Copy the full SHA
    b45c4b0 View commit details

Commits on Apr 22, 2019

  1. Copy the full SHA
    095b5fb View commit details

Commits on Apr 23, 2019

  1. Update readme

    xuri committed Apr 23, 2019
    Copy the full SHA
    29b2854 View commit details

Commits on Apr 27, 2019

  1. Copy the full SHA
    01a418b View commit details
Showing with 4,733 additions and 2,892 deletions.
  1. +3 −0 .gitignore
  2. +1 −0 .travis.yml
  3. +44 −45 CONTRIBUTING.md
  4. +0 −384 CONTRIBUTING_TEMPLATE.md
  5. +4 −3 LICENSE
  6. +40 −32 README.md
  7. +38 −30 README_zh.md
  8. +245 −0 adjust.go
  9. +69 −0 adjust_test.go
  10. +66 −0 calcchain.go
  11. +437 −401 cell.go
  12. +63 −5 cell_test.go
  13. +48 −0 cellmerged.go
  14. +54 −0 cellmerged_test.go
  15. +56 −40 chart.go
  16. +43 −10 chart_test.go
  17. +151 −117 col.go
  18. +119 −55 comment.go
  19. +15 −7 datavalidation.go
  20. +10 −5 datavalidation_test.go
  21. +43 −20 date.go
  22. +37 −7 date_test.go
  23. +24 −0 errors.go
  24. +21 −0 errors_test.go
  25. +49 −289 excelize.go
  26. BIN excelize.png
  27. +583 −766 excelize_test.go
  28. +18 −4 file.go
  29. +4 −4 go.mod
  30. +5 −4 go.sum
  31. +118 −86 lib.go
  32. +182 −37 lib_test.go
  33. BIN logo.png
  34. +168 −94 picture.go
  35. +166 −0 picture_test.go
  36. +266 −177 rows.go
  37. +684 −0 rows_test.go
  38. +45 −18 shape.go
  39. +391 −70 sheet.go
  40. +119 −0 sheet_test.go
  41. +29 −4 sheetpr.go
  42. +15 −33 sheetpr_test.go
  43. +5 −2 sheetview.go
  44. +22 −22 sheetview_test.go
  45. +86 −66 styles.go
  46. +34 −1 styles_test.go
  47. +84 −53 table.go
  48. BIN test/CalcChain.xlsx
  49. BIN test/images/chart.png
  50. +28 −0 xmlCalcChain.go
  51. +1 −1 xmlWorksheet.go
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
~$*.xlsx
test/Test*.xlsx
*.out
*.test
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ go:
- 1.9.x
- 1.10.x
- 1.11.x
- 1.12.x

os:
- linux
89 changes: 44 additions & 45 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- use this template to generate the contributor docs with the following command: `$ lingo run docs --template CONTRIBUTING_TEMPLATE.md --output CONTRIBUTING.md` -->
# Contributing to excelize

Want to hack on excelize? Awesome! This page contains information about reporting issues as well as some tips and
@@ -376,89 +375,89 @@ reading through [Effective Go](https://golang.org/doc/effective_go.html). The
kool-aid is a lot easier than going thirsty.

## Code Review Comments and Effective Go Guidelines
[CodeLingo](https://codelingo.io) automatically checks every pull request against the following guidelines from [Effective Go](https://golang.org/doc/effective_go.html) and [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments).

[CodeLingo](https://codelingo.io) automatically checks every pull request against the following guidelines from [Effective Go](https://golang.org/doc/effective_go.html) and [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments).

### Package Comment
Every package should have a package comment, a block comment preceding the package clause.
For multi-file packages, the package comment only needs to be present in one file, and any one will do.
The package comment should introduce the package and provide information relevant to the package as a
whole. It will appear first on the godoc page and should set up the detailed documentation that follows.

Every package should have a package comment, a block comment preceding the package clause.
For multi-file packages, the package comment only needs to be present in one file, and any one will do.
The package comment should introduce the package and provide information relevant to the package as a
whole. It will appear first on the godoc page and should set up the detailed documentation that follows.

### Single Method Interface Name
By convention, one-method interfaces are named by the method name plus an -er suffix

By convention, one-method interfaces are named by the method name plus an -er suffix
or similar modification to construct an agent noun: Reader, Writer, Formatter, CloseNotifier etc.

There are a number of such names and it's productive to honor them and the function names they capture.
Read, Write, Close, Flush, String and so on have canonical signatures and meanings. To avoid confusion,
don't give your method one of those names unless it has the same signature and meaning. Conversely,
if your type implements a method with the same meaning as a method on a well-known type, give it the
There are a number of such names and it's productive to honor them and the function names they capture.
Read, Write, Close, Flush, String and so on have canonical signatures and meanings. To avoid confusion,
don't give your method one of those names unless it has the same signature and meaning. Conversely,
if your type implements a method with the same meaning as a method on a well-known type, give it the
same name and signature; call your string-converter method String not ToString.


### Avoid Annotations in Comments

Comments do not need extra formatting such as banners of stars. The generated output
may not even be presented in a fixed-width font, so don't depend on spacing for alignment—godoc,
like gofmt, takes care of that. The comments are uninterpreted plain text, so HTML and other
annotations such as _this_ will reproduce verbatim and should not be used. One adjustment godoc
does do is to display indented text in a fixed-width font, suitable for program snippets.
may not even be presented in a fixed-width font, so don't depend on spacing for alignment—godoc,
like gofmt, takes care of that. The comments are uninterpreted plain text, so HTML and other
annotations such as _this_ will reproduce verbatim and should not be used. One adjustment godoc
does do is to display indented text in a fixed-width font, suitable for program snippets.
The package comment for the fmt package uses this to good effect.


### Comment First Word as Subject

Doc comments work best as complete sentences, which allow a wide variety of automated presentations.
The first sentence should be a one-sentence summary that starts with the name being declared.


### Good Package Name
It's helpful if everyone using the package can use the same name
to refer to its contents, which implies that the package name should
be good: short, concise, evocative. By convention, packages are
given lower case, single-word names; there should be no need for
underscores or mixedCaps. Err on the side of brevity, since everyone
using your package will be typing that name. And don't worry about
collisions a priori. The package name is only the default name for
imports; it need not be unique across all source code, and in the
rare case of a collision the importing package can choose a different
name to use locally. In any case, confusion is rare because the file
name in the import determines just which package is being used.

It's helpful if everyone using the package can use the same name
to refer to its contents, which implies that the package name should
be good: short, concise, evocative. By convention, packages are
given lower case, single-word names; there should be no need for
underscores or mixedCaps. Err on the side of brevity, since everyone
using your package will be typing that name. And don't worry about
collisions a priori. The package name is only the default name for
imports; it need not be unique across all source code, and in the
rare case of a collision the importing package can choose a different
name to use locally. In any case, confusion is rare because the file
name in the import determines just which package is being used.

### Avoid Renaming Imports

Avoid renaming imports except to avoid a name collision; good package names
should not require renaming. In the event of collision, prefer to rename the
most local or project-specific import.


### Context as First Argument
Values of the context.Context type carry security credentials, tracing information,
deadlines, and cancellation signals across API and process boundaries. Go programs
pass Contexts explicitly along the entire function call chain from incoming RPCs

Values of the context.Context type carry security credentials, tracing information,
deadlines, and cancellation signals across API and process boundaries. Go programs
pass Contexts explicitly along the entire function call chain from incoming RPCs
and HTTP requests to outgoing requests.

Most functions that use a Context should accept it as their first parameter.


### Do Not Discard Errors
Do not discard errors using _ variables. If a function returns an error,
check it to make sure the function succeeded. Handle the error, return it, or,
in truly exceptional situations, panic.

Do not discard errors using _ variables. If a function returns an error,
check it to make sure the function succeeded. Handle the error, return it, or,
in truly exceptional situations, panic.

### Go Error Format
Error strings should not be capitalized (unless beginning with proper nouns

Error strings should not be capitalized (unless beginning with proper nouns
or acronyms) or end with punctuation, since they are usually printed following
other context. That is, use fmt.Errorf("something bad") not fmt.Errorf("Something bad"),
so that log.Printf("Reading %s: %v", filename, err) formats without a spurious
so that log.Printf("Reading %s: %v", filename, err) formats without a spurious
capital letter mid-message. This does not apply to logging, which is implicitly
line-oriented and not combined inside other messages.


### Use Crypto Rand
Do not use package math/rand to generate keys, even
throwaway ones. Unseeded, the generator is completely predictable.
Seeded with time.Nanoseconds(), there are just a few bits of entropy.
Instead, use crypto/rand's Reader, and if you need text, print to
hexadecimal or base64

Do not use package math/rand to generate keys, even
throwaway ones. Unseeded, the generator is completely predictable.
Seeded with time.Nanoseconds(), there are just a few bits of entropy.
Instead, use crypto/rand's Reader, and if you need text, print to
hexadecimal or base64
Loading