Commit Graph

234 Commits

Author SHA1 Message Date
xuri fb72e56667
This closes #1569, formula function CONCAT, CONCATENATE support concatenation of multiple cell values 2023-07-06 10:49:49 +00:00
xuri 700af6a529
This fixed #1564, apply all of its arguments that meet multiple criteria 2023-07-03 00:05:26 +08:00
xuri 121ac17ca0
This fixed incorrect formula calculation exception expected result
- Simplify and remove duplicate code for optimization
- Update documentation comments with typo fix
- Handle error return to save the workbook
- Add file path length limitation details in the error message
2023-05-30 00:19:12 +08:00
xuri ef3e81de8e
This fixed across worksheet reference issue for the formula calculation engine 2023-05-17 00:05:27 +08:00
xuri 93c72b4d55
This optimizes internal functions signature and mutex declarations 2023-04-24 00:02:13 +08:00
Chen Zhidong 787453c6f0
Optimizing regexp calls to improve performance (#1532) 2023-04-23 18:00:31 +08:00
xuri fb6ce60bd5
This closes #1523, preventing format text cell value as a numeric
- Simplify variable declaration and error return statements
- Remove the internal `xlsxTabColor` data type
- Using the `xlsxColor` data type instead of `xlsxTabColor`
- Update unit test, improve code coverage
2023-04-19 00:05:59 +08:00
Rizki Putra e394f01a97
This update the return value for the `CalcCellValue` function (#1490)
- Using formula error string in the result of the `CalcCellValue` function
- Using the error message in the `CalcCellValue` function returns error
- Update unit tests
2023-03-15 09:17:30 +08:00
张涛 f707b2d2da
This closes #1484, fix the formula calc result issue (#1485)
- Optimize variable name for data validation
2023-03-01 13:25:17 +08:00
xuri 65a53b3ec6
Breaking changes: replace the type `ShapeParagraph` with `RichTextRun`
- This removes the `Color` field from the type `Shape`, and uses the `Fill` instead of it
- Remove sharp symbol from hex RGB color
- Update unit tests
2023-02-27 00:05:36 +08:00
xuri 94e86dca31
This renamed conditional format type `iconSet` to `icon_set`
- Remove Minimum, Maximum, MinLength, and MaxLength fields from the type `ConditionalFormatOptions`
- Update unit tests and format code
2023-02-22 22:46:36 +08:00
Shugo Kawamura f143dd5c34
Support double-byte chars for formula functions LENB, RIGHTB and MIDB (#1478) 2023-02-21 00:17:35 +08:00
Shugo Kawamura 983cd76485
This closes #1476, support double-byte chars for formula functions LEFT,RIGHT, LEN and MID (#1477) 2023-02-20 13:59:05 +08:00
jaby ad90cea78b
This closes #1469, fix cell resolver caused incorrect calculation result (#1470) 2023-02-15 21:38:11 +08:00
xuri 917e6e19d6
This roundup time value when a millisecond great than 500 to fix the accuracy issue
- Correction example in the documentation of set cell formula
- Rename the internal function `parseOptions` to `getOptions`
- Update unit tests
2023-01-20 03:10:04 +00:00
xuri 4f0025aab0
This closes #1447, add support for strict theme namespace
- Support specify if applying number format style for the cell calculation result
- Reduce cyclomatic complexities for the OpenReader function
2023-01-13 00:05:46 +08:00
xuri 5429f131f8
This closes #1438, fix cell data type issue for formula calculation engine
- Update dependencies module
- Update unit tests
2023-01-08 00:23:53 +08:00
xuri b39626fae9
This fixed worksheet protection issue
- Update example code in the documentation
- Update unit tests
- Rename `PictureOptions` to `GraphicOptions`
- Adjust partial options fields data types for the `PictureOptions` and `Shape` structure
- Update dependencies module
2023-01-02 11:47:31 +08:00
xuri f58dabd492
Breaking change: changed the function signature for 11 exported functions
* Change
    `func (f *File) NewConditionalStyle(style string) (int, error)`
    to
    `func (f *File) NewConditionalStyle(style *Style) (int, error)`
* Change
    `func (f *File) NewStyle(style interface{}) (int, error)`
     to
    `func (f *File) NewStyle(style *Style) (int, error)`
* Change
    `func (f *File) AddChart(sheet, cell, opts string, combo ...string) error`
     to
    `func (f *File) AddChart(sheet, cell string, chart *ChartOptions, combo ...*ChartOptions) error`
* Change
    `func (f *File) AddChartSheet(sheet, opts string, combo ...string) error`
     to
    `func (f *File) AddChartSheet(sheet string, chart *ChartOptions, combo ...*ChartOptions) error`
* Change
    `func (f *File) AddShape(sheet, cell, opts string) error`
     to
    `func (f *File) AddShape(sheet, cell string, opts *Shape) error`
* Change
    `func (f *File) AddPictureFromBytes(sheet, cell, opts, name, extension string, file []byte) error`
     to
    `func (f *File) AddPictureFromBytes(sheet, cell, name, extension string, file []byte, opts *PictureOptions) error`
* Change
    `func (f *File) AddTable(sheet, hCell, vCell, opts string) error`
     to
    `func (f *File) AddTable(sheet, reference string, opts *TableOptions) error`
* Change
    `func (sw *StreamWriter) AddTable(hCell, vCell, opts string) error`
     to
    `func (sw *StreamWriter) AddTable(reference string, opts *TableOptions) error`
* Change
    `func (f *File) AutoFilter(sheet, hCell, vCell, opts string) error`
     to
    `func (f *File) AutoFilter(sheet, reference string, opts *AutoFilterOptions) error`
* Change
    `func (f *File) SetPanes(sheet, panes string) error`
     to
    `func (f *File) SetPanes(sheet string, panes *Panes) error`
* Change
    `func (sw *StreamWriter) AddTable(hCell, vCell, opts string) error`
     to
    `func (sw *StreamWriter) AddTable(reference string, opts *TableOptions) error`
* Change
    `func (f *File) SetConditionalFormat(sheet, reference, opts string) error`
     to
    `func (f *File) SetConditionalFormat(sheet, reference string, opts []ConditionalFormatOptions) error`
* Add exported types:
  * AutoFilterListOptions
  * AutoFilterOptions
  * Chart
  * ChartAxis
  * ChartDimension
  * ChartLegend
  * ChartLine
  * ChartMarker
  * ChartPlotArea
  * ChartSeries
  * ChartTitle
  * ConditionalFormatOptions
  * PaneOptions
  * Panes
  * PictureOptions
  * Shape
  * ShapeColor
  * ShapeLine
  * ShapeParagraph
  * TableOptions
* This added support for set sheet visible as very hidden
* Return error when missing required parameters for set defined name
* Update unit test and comments
2022-12-30 00:50:08 +08:00
郭伟匡 6a5ee811ba
This closes #1425, breaking changes for sheet name (#1426)
- Checking and return error for invalid sheet name instead of trim invalid characters
- Add error return for the 4 functions: `DeleteSheet`, `GetSheetIndex`, `GetSheetVisible` and `SetSheetName`
- Export new error 4 constants: `ErrSheetNameBlank`, `ErrSheetNameInvalid`, `ErrSheetNameLength` and `ErrSheetNameSingleQuote`
- Rename exported error constant `ErrExistsWorksheet` to `ErrExistsSheet`
- Update unit tests for 90 functions: `AddChart`,  `AddChartSheet`, `AddComment`, `AddDataValidation`, `AddPicture`, `AddPictureFromBytes`, `AddPivotTable`, `AddShape`, `AddSparkline`, `AddTable`, `AutoFilter`, `CalcCellValue`, `Cols`, `DeleteChart`, `DeleteComment`, `DeleteDataValidation`, `DeletePicture`, `DeleteSheet`, `DuplicateRow`, `DuplicateRowTo`, `GetCellFormula`, `GetCellHyperLink`, `GetCellRichText`, `GetCellStyle`, `GetCellType`, `GetCellValue`, `GetColOutlineLevel`, `GetCols`, `GetColStyle`, `GetColVisible`, `GetColWidth`, `GetConditionalFormats`, `GetDataValidations`, `GetMergeCells`, `GetPageLayout`, `GetPageMargins`, `GetPicture`, `GetRowHeight`, `GetRowOutlineLevel`, `GetRows`, `GetRowVisible`, `GetSheetIndex`, `GetSheetProps`, `GetSheetVisible`, `GroupSheets`, `InsertCol`, `InsertPageBreak`, `InsertRows`, `MergeCell`, `NewSheet`, `NewStreamWriter`, `ProtectSheet`, `RemoveCol`, `RemovePageBreak`, `RemoveRow`, `Rows`, `SearchSheet`, `SetCellBool`, `SetCellDefault`, `SetCellFloat`, `SetCellFormula`, `SetCellHyperLink`, `SetCellInt`, `SetCellRichText`, `SetCellStr`, `SetCellStyle`, `SetCellValue`, `SetColOutlineLevel`, `SetColStyle`, `SetColVisible`, `SetColWidth`, `SetConditionalFormat`, `SetHeaderFooter`, `SetPageLayout`, `SetPageMargins`, `SetPanes`, `SetRowHeight`, `SetRowOutlineLevel`, `SetRowStyle`, `SetRowVisible`, `SetSheetBackground`, `SetSheetBackgroundFromBytes`, `SetSheetCol`, `SetSheetName`, `SetSheetProps`, `SetSheetRow`, `SetSheetVisible`, `UnmergeCell`, `UnprotectSheet` and
`UnsetConditionalFormat`
- Update documentation of the set style functions

Co-authored-by: guoweikuang <weikuang.guo@shopee.com>
2022-12-23 00:54:40 +08:00
devloppper dde6b9c001
This closes #1396, fix formula fn ADDRESS result error with empty worksheet name (#1397)
- Update unit tests

Co-authored-by: jayhoo <hujie@ynningneng.com>
2022-11-22 00:15:57 +08:00
xuri a410b22bdd
Fix the error on getting the range of merged cells on the worksheet which contains one cell merged cell range
- Parse workbook default theme for custom theme color support in the feature
- Variables name typo fix
- Add system foreground and background color as RGB in the IndexedColorMapping list
2022-10-28 00:31:55 +08:00
xuri 14c6a198ce
Support get cell value which contains a date in the ISO 8601 format
- Support set and get font color with indexed color
- New export variable `IndexedColorMapping`
- Fix getting incorrect page margin settings when the margin is 0
- Update unit tests and comments typo fixes
- ref #65, new formula functions: AGGREGATE and SUBTOTAL
2022-10-24 00:52:09 +08:00
gonghaibinx f843a9ea56
Fix the formula calculation result issue of the OR function (#1374)
Co-authored-by: gonghaibin <gonghaibin@qq.com>
2022-10-21 00:04:32 +08:00
xuri b1e776ee33
Support to set summary columns to appear to the right of detail in an outline
- Simplify calculation engine code
- Update documentation for the functions
- Update dependencies module
2022-10-08 22:08:16 +08:00
xuri efcf599dfe
This closes #1360, closes #1361
- Fix default number format parse issue with a long string of digits
- Fix creating a sheet with an empty name cause a corrupted file
- The `GetCellStyle` function no longer return master cell style of the merge cell range
- Using the specialized name in variables and functions
2022-09-28 00:04:17 +08:00
xuri 3f702999e6
Using the specialized name in a variable and making comments clear
- Add JSON tags for `AppProperties`, `PivotTableOption` and `PivotTableField` structure
2022-09-18 00:07:15 +08:00
xuri 75ce231728
This closes #1323, an error will be returned when set the not exist style ID 2022-09-01 00:41:52 +08:00
xuri d1e76fc432
This closes #1319, fix calculate error for formula with negative symbol
- Update unit test and comment for the functions
2022-08-17 10:59:52 +08:00
xuri 551fb8a9e4
This closes #1244 and closes #1314, improving the compatibility with Google Sheet
- Format code with `gofmt`
2022-08-13 11:21:59 +08:00
MJacred 6429588e14
adjust `ErrColumnNumber`, rename `TotalColumns` to `MaxColumns` and add new constant `MinColumns` (#1272)
Signed-off-by: Benjamin Lösch <loesch.benny92@gmx.de>
2022-07-14 23:36:43 +08:00
xuri a65c5846e4
This closes #1262, support for dependence formulas calculation
- Add export option `MaxCalcIterations` for specifies the maximum iterations for iterative calculation
- Update unit test for the database formula functions
2022-07-10 18:14:48 +08:00
xuri d74adcbb15
ref #65, new formula function: DGET 2022-07-03 15:31:24 +08:00
xuri 695db4eae0
ref #65, new formula functions: DPRODUCT, DSTDEV, DSTDEVP, DSUM, DVAR, and DVARP 2022-07-02 13:43:31 +08:00
xuri dd6c3905e0
ref #65, new formula function: DAVERAGE 2022-07-01 00:43:27 +08:00
xuri eee6607e47
ref #65, new formula functions: DMAX and DMIN 2022-06-28 23:18:48 +08:00
xuri 301f7bc217
This closes #1260, fixes compiling issue under 32-bit, and new formula functions
- ref #65, new formula functions: DCOUNT and DCOUNTA
- support percentile symbol in condition criteria expression
- this update dependencies module
2022-06-27 21:00:59 +08:00
xuri 2e1b0efadc
ref #65, new formula function: HYPERLINK 2022-06-24 01:03:19 +08:00
xuri 61c71caf4f
ref #65, new formula function: EUROCONVERT 2022-06-22 20:17:22 +08:00
xuri 7819cd7fec
ref #65, new formula function: STEYX 2022-06-20 22:05:23 +08:00
xuri 5f4131aece
ref #65, new formula function: DAYS360 2022-06-17 00:03:31 +08:00
xuri b69da76063
ref #65, new formula functions: NETWORKDAYS, NETWORKDAYS.INTL, and WORKDAY 2022-06-16 00:01:32 +08:00
ww1516123 7f570c74f8
Fix the problem of multi arguments calculation (#1253) 2022-06-14 15:04:43 +08:00
xuri d383f0ae6e
ref #65: new formula function WORKDAY.INTL 2022-06-13 00:05:52 +08:00
Eng Zer Jun 6bcf5e4ede
refactor: replace strings.Replace with strings.ReplaceAll (#1250)
strings.ReplaceAll(s, old, new) is a wrapper function for
strings.Replace(s, old, new, -1). But strings.ReplaceAll is more
readable and removes the hardcoded -1.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-06-12 00:19:12 +08:00
xuri f5d3d59d8c
ref #65: new formula function EOMONTH 2022-06-11 14:08:21 +08:00
xuri 980fffa2b6
ref #65: new formula function EDATE 2022-06-10 00:10:22 +08:00
xuri 604a01bf6b
ref #65: new formula function WEEKNUM 2022-06-09 08:16:48 +08:00
xuri 1c167b96a3
Improves the calculation engine, docs update, and adds the dependabot
- Initialize array formula support for the formula calculation engine
- Update example and unit test of `AddPivotTable`
- Update the supported hash algorithm of ProtectSheet
2022-05-26 00:15:28 +08:00
xuri afb2d27c90
This fix formula calculation accuracy issue and panic when set pane
- Fix `GROWTH` and `TREND` calculation accuracy issue
- Fix panic when add pane on empty sheet views worksheet
- New exported constants `MinFontSize`
2022-05-23 13:02:11 +08:00