Commit Graph

227 Commits

Author SHA1 Message Date
realzuojianxiang 5975d87f7e
This closes #1851, and closes #1856 fix formula calculation result round issue (#1860)
- The SetSheetName function now support case sensitivity
- Update unit tests
2024-03-22 16:09:45 +08:00
xuri f20bbd1f1d
This closes #1830, closes #1831, and closes #1833
- Fix a v2.8.1 regression bug, auto filter does not work in the LibreOffice
- Fix a v2.8.1 regression bug, support to adjust data validation with multiple cell range
- Fix incorrect result data type of the DATE formula function
- Update the unit tests
2024-03-04 21:40:27 +08:00
岳晨旭 7b4da3906d
This closes #1819, closes #1827, formula function ISNUMBER, OR and FIND support matrix arguments (#1829)
- Keep minimum column and row number in formula operand when deleting columns and rows
- Update unit tests
2024-02-29 09:16:39 +08:00
zhukewen 9cbe3b6bd0
This closes #1807, calculation engine support date and formula type cell (#1810)
Co-authored-by: zhualong <274131322@qq.com>
2024-02-05 00:06:38 +08:00
funa12 a258e3d858
Fix CalcCellValue does not return raw value when enable RawCellValue (#1803) 2024-02-02 10:11:16 +08:00
Jerry e4497c494d
ref #65, new formula function: DBCS (#1791)
Co-authored-by: wujierui <wujierui@jimabrand.com>
2024-01-25 14:39:21 +08:00
3zmx 50e23df865
ref #65, support _xlfn.ANCHORARRAY formula function (#1784)
- Initial formula array calculation support
- Update unit test and documentation
2024-01-18 15:31:43 +08:00
li 00d62590f4
This closes #664, support get embedded cell images (#1759)
Co-authored-by: liying05 <liying05@zhidemai.com>
2023-12-15 13:09:42 +08:00
xuri 2499bf6b5b
Support 5 new kinds of conditional formatting types
- New conditional formatting types: text, blanks, no blanks, errors, and no errors
- Support calculate formula with multiple dash arithmetic symbol
- Fix empty calculate result with numeric arguments in LEN, LOWER, PROPER, REPT, UPPER, and IF formula functions
- Uniform double quote in calculation unit tests
- Update unit tests
2023-11-13 00:16:29 +08:00
rjtee a8cbcfa39b
This closes #1306 and closes #1615 (#1698)
- Support adjust formula on inserting/deleting columns/rows
2023-10-24 00:05:52 +08:00
xuri 99df1a7343
This closes #1681, closes #1683
- Fix incorrect formula calculation result
- Introduce new exported function `SetCellUint`
- Updates unit test
- Typo fixed
2023-10-08 00:06:11 +08:00
xuri f85770f4c9
ref #65, formula functions TEXTAFTER and TEXTBEFORE (array formula not support yet) 2023-10-01 13:37:47 +08:00
xuri 9c079e5eec
This fix #1665, supports getting formula string cell value
- Improve compatibility for absolute path drawing part
- Fix incorrect table ID generated in the workbook which contains single table cells
- Fix missing relationship parts in the content types in some cases
- Upgrade number format parser to fix missing literal tokens in some cases
- Update built-in zh-cn and zh-tw language number format
- Ref #65, init new formula function: TEXT
- Remove duplicate style-related variables
- Update the unit tests
2023-09-21 00:06:31 +08:00
xuri 5a039f3045
This fixes #1658
- Fix a v2.8.0 regression bug, number format code apply result was empty
- Fix calculate formula functions CHITEST and MMULT panic in some cases
- Updated unit tests
2023-09-14 22:56:28 +08:00
xuri ae64bcaabe
This fixes #1643, fixes #1647 and fixes #1653
- Correction cell type when formatting date type cell value
- Add check for MID and MIDB formula functions num_chars arguments, prevent panic on specifying a negative number
- Ref #65, add support for 2 formula functions: SEARCH and SEARCHB
- Fix a v2.8.0 regression bug, error on set print area and print titles with built-in special defined name
- Add new exported function `GetPivotTables` for get pivot tables
- Add a new `Name` field in the `PivotTableOptions` to support specify pivot table name
- Using relative cell reference in the pivot table docs and unit tests
- Support adding slicer content type part internally
- Add new exported source relationship and namespace `NameSpaceSpreadSheetXR10`, `ContentTypeSlicer`, `ContentTypeSlicerCache`, and `SourceRelationshipSlicer`
- Add new exported extended URI `ExtURIPivotCacheDefinition`
- Fix formula argument wildcard match issues
- Update GitHub Actions configuration, test on Go 1.21.x with 1.21.1 and later
- Avoid corrupted workbooks generated by improving compatibility with internally indexed color styles
2023-09-08 00:21:38 +08:00
fsfsx 4957ee9abc
ref #65, add support for 10 formula functions
- Add support for 10 formula functions: ARRAYTOTEXT, FORECAST, FORECAST.LINEAR, FREQUENCY, INTERCEPT, ODDFYIELD, ODDLPRICE, ODDLYIELD, PROB and VALUETOTEXT
- Update unit tests
2023-08-26 13:14:03 +08:00
xuri eb175906e7
This fixes #1599, and improve date and time number format
- Fix basic arithmetic operator priority issues
- Support apply date and time number format with 52 languages: Estonian, Faroese, Filipino, Finnish, Frisian, Fulah, Galician, Georgian, Greek, Greenlandic, Guarani, Gujarati, Hausa, Hawaiian, Hebrew, Hindi, Hungarian, Icelandic, Igbo, Indonesian, Inuktitut, Kannada, Kashmiri, Kazakh, Khmer, Kiche, Kinyarwanda, Kiswahili, Konkani, Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malay, Malayalam, Maltese, Maori, Mapudungun, Marathi, Mohawk, Morocco, Nepali, Nigeria, Norwegian, Occitan, Odia, Oromo, Pashto and Syllabics
- Support apply the Chinese weekdays' number formats
- Update the unit test and dependencies modules
2023-08-06 00:02:48 +08:00
xuri 8d996ca138
This closes #1582, fixes the formula calculation bug, and improves form controls
- Fix incorrect formula calculate results on a nested argument function which returns a numeric result
- Add a new exported error variable `ErrorFormControlValue`
- Rename exported enumeration `FormControlCheckbox` to `FormControlCheckBox`
- Rename exported enumeration `FormControlRadio` to `FormControlOptionButton`
- The `AddFormControl` function supports new 5 form controls: spin button, check box, group box, label, and scroll bar
- Update documentation for the `GraphicOptions` data type, `AddFormControl` and `NewStreamWriter` functions
- Update the unit tests
2023-07-21 00:03:37 +08:00
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
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
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 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 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 f44153ea46
This closes #1377, stream writer writes inline string type for string cell value
- Add `CellTypeFormula`, `CellTypeInlineString`, `CellTypeSharedString` and remove `CellTypeString` in `CellType` enumeration
- Unit tests updated
2022-10-25 10:24:45 +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 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
davidborry bef49e40ee
This closes #1330 update non existing sheet error messages (#1331) 2022-08-28 00:16:41 +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 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
xuri f5d3d59d8c
ref #65: new formula function EOMONTH 2022-06-11 14:08:21 +08:00