Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing overload in cell class #365

Draft
wants to merge 62 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
852b98f
Add support to override images
SferaDev Apr 16, 2020
d499960
Add from and to modifiers to drawing
SferaDev Apr 16, 2020
eda05b7
Add missing import
SferaDev Apr 16, 2020
2d77ab1
Return instance on methods
SferaDev Apr 16, 2020
82a0be9
Fix start point
SferaDev Apr 16, 2020
1045475
Add support to create images in a worksheet
SferaDev Apr 28, 2020
c0e4f93
Add findByExtension utility method
SferaDev Apr 29, 2020
59fa78f
Do not repeat relationship if sheet already had pictures
SferaDev Apr 29, 2020
f7c486c
Fix corrupt file and only add content types if not already defined
SferaDev Apr 29, 2020
a209715
Remove and re-add drawing if it was already set
SferaDev Apr 29, 2020
3ae76a1
Merge pull request #1 from EyeSeeTea/feature/override-images
adrianq May 5, 2020
3601793
Allow listing defined names
SferaDev May 6, 2020
4e3f841
Merge pull request #2 from EyeSeeTea/feature/defined-names
adrianq May 8, 2020
1f12ac5
Merge pull request #3 from EyeSeeTea/development
adrianq May 8, 2020
7777337
Prettify Sheet.js
tokland Oct 22, 2020
cf2872a
Parse excel x14:dataValidations
tokland Oct 22, 2020
5bcbb8b
Merge pull request #4 from EyeSeeTea/feature/excel-data-validations
adrianq Oct 23, 2020
f939332
Merge pull request #5 from EyeSeeTea/development
adrianq Oct 27, 2020
7931c98
Add shared formula dictionary
SferaDev Nov 19, 2020
770c6bf
Remove unused line
SferaDev Nov 19, 2020
255ae24
Remove todo comment
SferaDev Nov 19, 2020
e8bb957
Merge pull request #6 from EyeSeeTea/feature/shared-formulas
adrianq Nov 19, 2020
46dc5bd
Merge pull request #7 from EyeSeeTea/development
adrianq Nov 20, 2020
d6c30b6
Update docs
SferaDev Jan 15, 2021
4bdb07b
Migrate to yarn
SferaDev Jan 15, 2021
7e3d991
Compile browserified output
SferaDev Jan 15, 2021
1465db8
Add release script
SferaDev Jan 15, 2021
19aaeb2
Add typescript defintions
SferaDev Jan 15, 2021
7bd1027
Update output async type
SferaDev Jan 15, 2021
4a85b52
Add direct accesors
SferaDev Jan 15, 2021
63ab5f5
Compact results
SferaDev Jan 15, 2021
2b1419d
Add merged cell helper from Bulk-Load
SferaDev Jan 15, 2021
cae3235
Re-compile browser
SferaDev Jan 15, 2021
2866a97
Ignore browser dist files
SferaDev Jan 15, 2021
25b40ba
Update publish script
SferaDev Jan 15, 2021
8202b17
Add definedName type
SferaDev Jan 18, 2021
7aee4db
Move build to prerelease
SferaDev Jan 20, 2021
b578e4a
Properly type shared formulas method
SferaDev Jan 20, 2021
b3c9cdb
Rename package
SferaDev Jan 24, 2021
cebe815
Remove redundant eyeseetea from package name
SferaDev Jan 24, 2021
0ee5602
Update version
SferaDev Jan 29, 2021
f9d8049
Merge pull request #8 from EyeSeeTea/feature/publish-package
SferaDev Jan 29, 2021
6b9685d
Merge pull request #9 from EyeSeeTea/development
SferaDev Jan 29, 2021
4d1b5eb
Add sheet protection
SferaDev Feb 10, 2021
4bccb2e
Bump beta version
SferaDev Feb 10, 2021
26dbfd0
Update docs
SferaDev Feb 10, 2021
c9cbbe5
Update publish script
SferaDev Feb 10, 2021
800caad
Fix excel generation if sheetProtection already exists
SferaDev Feb 11, 2021
590a2d6
Merge pull request #10 from EyeSeeTea/feature/sheet-protection
adrianq Feb 11, 2021
4e2a71e
bump version
adrianq Feb 11, 2021
6356d41
Merge pull request #11 from EyeSeeTea/development
adrianq Feb 11, 2021
1b536db
Add cell.comment / sheet.comment setter
tokland Nov 25, 2022
d7b0609
Add attribute errorStyle to data validation node
tokland Nov 25, 2022
3a7f4ab
Add conditional formatting
tokland Nov 30, 2022
c340eb0
Bump version
tokland Mar 18, 2023
aad60eb
fix windows excel compliance
dimitriredp Apr 4, 2023
5f8295d
Merge branch 'feature/comments' of github.com:dimitriredp/xlsx-popula…
tokland Jun 6, 2023
e75987a
Merge branch 'dimitriredp-feature/comments' into feature/comments
tokland Jun 6, 2023
9074c25
Merge pull request #12 from EyeSeeTea/feature/comments
adrianq Jun 6, 2023
86d566b
bump version
adrianq Jun 6, 2023
c971df1
Merge pull request #14 from EyeSeeTea/development
adrianq Jun 6, 2023
53b0478
fix: add missing typing in cell class
Bassadin Mar 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ node_modules
.lock-wscript

.idea

browser/
147 changes: 134 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,7 @@ A cell
* [.hyperlink()](#Cell+hyperlink) ⇒ <code>string</code> \| <code>undefined</code>
* [.hyperlink(hyperlink)](#Cell+hyperlink) ⇒ [<code>Cell</code>](#Cell)
* [.hyperlink(opts)](#Cell+hyperlink) ⇒ [<code>Cell</code>](#Cell)
* [.comment(opts)](#Cell+comment) ⇒ [<code>Cell</code>](#Cell)
* [.dataValidation()](#Cell+dataValidation) ⇒ <code>object</code> \| <code>undefined</code>
* [.dataValidation(dataValidation)](#Cell+dataValidation) ⇒ [<code>Cell</code>](#Cell)
* [.tap(callback)](#Cell+tap) ⇒ [<code>Cell</code>](#Cell)
Expand Down Expand Up @@ -1226,6 +1227,21 @@ Set the hyperlink options on the cell.
| [opts.email] | <code>string</code> | Email address, ignored if opts.hyperlink is set. |
| [opts.emailSubject] | <code>string</code> | Email subject, ignored if opts.hyperlink is set. |

<a name="Cell+comment"></a>

#### cell.comment(opts) ⇒ [<code>Cell</code>](#Cell)
Set or clear the comment on the cell.

**Kind**: instance method of [<code>Cell</code>](#Cell)
**Returns**: [<code>Cell</code>](#Cell) - The cell.

| Param | Type | Description |
| --- | --- | --- |
| opts | <code>Object</code> \| <code>undefined</code> | Options or undefined (remove comment). |
| [opts.text] | <code>string</code> | The comment text to set. |
| [opts.width] | <code>string</code> | Comment box width. |
| [opts.height] | <code>string</code> | Comment box height. |

<a name="Cell+dataValidation"></a>

#### cell.dataValidation() ⇒ <code>object</code> \| <code>undefined</code>
Expand Down Expand Up @@ -2440,6 +2456,7 @@ A row.

* [Row](#Row)
* [.address([opts])](#Row+address) ⇒ <code>string</code>
* [.cells()](#Row+cells) ⇒ [<code>Array.&lt;Cell&gt;</code>](#Cell)
* [.cell(columnNameOrNumber)](#Row+cell) ⇒ [<code>Cell</code>](#Cell)
* [.height()](#Row+height) ⇒ <code>undefined</code> \| <code>number</code>
* [.height(height)](#Row+height) ⇒ [<code>Row</code>](#Row)
Expand Down Expand Up @@ -2469,6 +2486,13 @@ Get the address of the row.
| [opts.includeSheetName] | <code>boolean</code> | Include the sheet name in the address. |
| [opts.anchored] | <code>boolean</code> | Anchor the address. |

<a name="Row+cells"></a>

#### row.cells() ⇒ [<code>Array.&lt;Cell&gt;</code>](#Cell)
Gets all cells from row in the workbook.

**Kind**: instance method of [<code>Row</code>](#Row)
**Returns**: [<code>Array.&lt;Cell&gt;</code>](#Cell) - Cells of the row.
<a name="Row+cell"></a>

#### row.cell(columnNameOrNumber) ⇒ [<code>Cell</code>](#Cell)
Expand Down Expand Up @@ -2618,6 +2642,10 @@ A worksheet.
* [Sheet](#Sheet)
* [.active()](#Sheet+active) ⇒ <code>boolean</code>
* [.active(active)](#Sheet+active) ⇒ [<code>Sheet</code>](#Sheet)
* [.sharedFormulas()](#Sheet+sharedFormulas) ⇒ <code>Object.&lt;string, {ref: string, formula: string}&gt;</code>
* [.sharedFormulas(id)](#Sheet+sharedFormulas) ⇒ <code>Object.&lt;{ref: string, formula: string}&gt;</code>
* [.sharedFormulas(id, sharedFormula)](#Sheet+sharedFormulas) ⇒ [<code>Sheet</code>](#Sheet)
* [.rows()](#Sheet+rows) ⇒ [<code>Array.&lt;Row&gt;</code>](#Row)
* [.activeCell()](#Sheet+activeCell) ⇒ [<code>Cell</code>](#Cell)
* [.activeCell(cell)](#Sheet+activeCell) ⇒ [<code>Sheet</code>](#Sheet)
* [.activeCell(rowNumber, columnNameOrNumber)](#Sheet+activeCell) ⇒ [<code>Sheet</code>](#Sheet)
Expand All @@ -2632,6 +2660,8 @@ A worksheet.
* [.gridLinesVisible(selected)](#Sheet+gridLinesVisible) ⇒ [<code>Sheet</code>](#Sheet)
* [.hidden()](#Sheet+hidden) ⇒ <code>boolean</code> \| <code>string</code>
* [.hidden(hidden)](#Sheet+hidden) ⇒ [<code>Sheet</code>](#Sheet)
* [.protected()](#Sheet+protected) ⇒ <code>boolean</code>
* [.protected(password)](#Sheet+protected) ⇒ [<code>Sheet</code>](#Sheet)
* [.move([indexOrBeforeSheet])](#Sheet+move) ⇒ [<code>Sheet</code>](#Sheet)
* [.name()](#Sheet+name) ⇒ <code>string</code>
* [.name(name)](#Sheet+name) ⇒ [<code>Sheet</code>](#Sheet)
Expand All @@ -2652,9 +2682,12 @@ A worksheet.
* [.pageBreaks()](#Sheet+pageBreaks) ⇒ <code>Object</code>
* [.verticalPageBreaks()](#Sheet+verticalPageBreaks) ⇒ [<code>PageBreaks</code>](#PageBreaks)
* [.horizontalPageBreaks()](#Sheet+horizontalPageBreaks) ⇒ [<code>PageBreaks</code>](#PageBreaks)
* [.comment(address, opts)](#Sheet+comment) ⇒ [<code>Sheet</code>](#Sheet)
* [.conditionalFormatting(address)](#Sheet+conditionalFormatting) ⇒ [<code>Sheet</code>](#Sheet)
* [.hyperlink(address)](#Sheet+hyperlink) ⇒ <code>string</code> \| <code>undefined</code>
* [.hyperlink(address, hyperlink, [internal])](#Sheet+hyperlink) ⇒ [<code>Sheet</code>](#Sheet)
* [.hyperlink(address, opts)](#Sheet+hyperlink) ⇒ [<code>Sheet</code>](#Sheet)
* [.merged()](#Sheet+merged) ⇒ [<code>Array.&lt;Range&gt;</code>](#Range)
* [.printOptions(attributeName)](#Sheet+printOptions) ⇒ <code>boolean</code>
* [.printOptions(attributeName, attributeEnabled)](#Sheet+printOptions) ⇒ [<code>Sheet</code>](#Sheet)
* [.printGridLines()](#Sheet+printGridLines) ⇒ <code>boolean</code>
Expand Down Expand Up @@ -2690,6 +2723,45 @@ Make the sheet the active sheet in the workkbok.
| --- | --- | --- |
| active | <code>boolean</code> | Must be set to `true`. Deactivating directly is not supported. To deactivate, you should activate a different sheet instead. |

<a name="Sheet+sharedFormulas"></a>

#### sheet.sharedFormulas() ⇒ <code>Object.&lt;string, {ref: string, formula: string}&gt;</code>
Get all the shared formulas in the sheet

**Kind**: instance method of [<code>Sheet</code>](#Sheet)
**Returns**: <code>Object.&lt;string, {ref: string, formula: string}&gt;</code> - Dictionary of formulas
<a name="Sheet+sharedFormulas"></a>

#### sheet.sharedFormulas(id) ⇒ <code>Object.&lt;{ref: string, formula: string}&gt;</code>
Get a given shared formula.

**Kind**: instance method of [<code>Sheet</code>](#Sheet)
**Returns**: <code>Object.&lt;{ref: string, formula: string}&gt;</code> - The shared formula

| Param | Type | Description |
| --- | --- | --- |
| id | <code>string</code> | The shared formula id |

<a name="Sheet+sharedFormulas"></a>

#### sheet.sharedFormulas(id, sharedFormula) ⇒ [<code>Sheet</code>](#Sheet)
Set or update a given shared formula by its id

**Kind**: instance method of [<code>Sheet</code>](#Sheet)
**Returns**: [<code>Sheet</code>](#Sheet) - The sheet.

| Param | Type | Description |
| --- | --- | --- |
| id | <code>string</code> | The shared formula id |
| sharedFormula | <code>Object.&lt;{ref: string, formula: string}&gt;</code> | The shared formula |

<a name="Sheet+rows"></a>

#### sheet.rows() ⇒ [<code>Array.&lt;Row&gt;</code>](#Row)
Gets all rows from sheet in the workbook.

**Kind**: instance method of [<code>Sheet</code>](#Sheet)
**Returns**: [<code>Array.&lt;Row&gt;</code>](#Row) - Rows of the sheet.
<a name="Sheet+activeCell"></a>

#### sheet.activeCell() ⇒ [<code>Cell</code>](#Cell)
Expand Down Expand Up @@ -2842,6 +2914,25 @@ Set whether the sheet is hidden or not.
| --- | --- | --- |
| hidden | <code>boolean</code> \| <code>string</code> | True to hide, false to show, and 'very' to make very hidden. |

<a name="Sheet+protected"></a>

#### sheet.protected() ⇒ <code>boolean</code>
Gets a value indicating if the sheet is password protected or not.

**Kind**: instance method of [<code>Sheet</code>](#Sheet)
**Returns**: <code>boolean</code> - True if sheet has protection
<a name="Sheet+protected"></a>

#### sheet.protected(password) ⇒ [<code>Sheet</code>](#Sheet)
Set whether the sheet is password protected or not.

**Kind**: instance method of [<code>Sheet</code>](#Sheet)
**Returns**: [<code>Sheet</code>](#Sheet) - The sheet.

| Param | Type | Description |
| --- | --- | --- |
| password | <code>string</code> | Value to protect sheet modifications. |

<a name="Sheet+move"></a>

#### sheet.move([indexOrBeforeSheet]) ⇒ [<code>Sheet</code>](#Sheet)
Expand Down Expand Up @@ -3031,6 +3122,34 @@ Gets the horizontal page breaks.

**Kind**: instance method of [<code>Sheet</code>](#Sheet)
**Returns**: [<code>PageBreaks</code>](#PageBreaks) - horizontal PageBreaks.
<a name="Sheet+comment"></a>

#### sheet.comment(address, opts) ⇒ [<code>Sheet</code>](#Sheet)
Set the comment on the cell with the given address.

**Kind**: instance method of [<code>Sheet</code>](#Sheet)
**Returns**: [<code>Sheet</code>](#Sheet) - The sheet.

| Param | Type | Description |
| --- | --- | --- |
| address | <code>string</code> | The address of the commented cell. |
| opts | <code>Object</code> \| <code>undefined</code> | Options or undefined (remove comment). |
| [opts.text] | <code>string</code> | The comment text to set. |
| [opts.width] | <code>string</code> | Comment box width. |
| [opts.height] | <code>string</code> | Comment box height. |

<a name="Sheet+conditionalFormatting"></a>

#### sheet.conditionalFormatting(address) ⇒ [<code>Sheet</code>](#Sheet)
Set the conditional Formatting on the cell with the given address.

**Kind**: instance method of [<code>Sheet</code>](#Sheet)
**Returns**: [<code>Sheet</code>](#Sheet) - The sheet.

| Param | Type | Description |
| --- | --- | --- |
| address | <code>string</code> | The address of the commented cell. |

<a name="Sheet+hyperlink"></a>

#### sheet.hyperlink(address) ⇒ <code>string</code> \| <code>undefined</code>
Expand Down Expand Up @@ -3074,6 +3193,13 @@ Set the hyperlink on the cell with the given address and options.
| [opts.email] | <code>string</code> | Email address, ignored if opts.hyperlink is set. |
| [opts.emailSubject] | <code>string</code> | Email subject, ignored if opts.hyperlink is set. |

<a name="Sheet+merged"></a>

#### sheet.merged() ⇒ [<code>Array.&lt;Range&gt;</code>](#Range)
Gets all merged cells of the Sheet.

**Kind**: instance method of [<code>Sheet</code>](#Sheet)
**Returns**: [<code>Array.&lt;Range&gt;</code>](#Range) - Ranges of merged cells of the sheet.
<a name="Sheet+printOptions"></a>

#### sheet.printOptions(attributeName) ⇒ <code>boolean</code>
Expand Down Expand Up @@ -3255,12 +3381,12 @@ A workbook.
* [.activeSheet()](#Workbook+activeSheet) ⇒ [<code>Sheet</code>](#Sheet)
* [.activeSheet(sheet)](#Workbook+activeSheet) ⇒ [<code>Workbook</code>](#Workbook)
* [.addSheet(name, [indexOrBeforeSheet])](#Workbook+addSheet) ⇒ [<code>Sheet</code>](#Sheet)
* [.definedName()](#Workbook+definedName) ⇒ <code>Array.&lt;string&gt;</code>
* [.definedName(name)](#Workbook+definedName) ⇒ <code>undefined</code> \| <code>string</code> \| [<code>Cell</code>](#Cell) \| [<code>Range</code>](#Range) \| [<code>Row</code>](#Row) \| [<code>Column</code>](#Column)
* [.definedName(name, refersTo)](#Workbook+definedName) ⇒ [<code>Workbook</code>](#Workbook)
* [.deleteSheet(sheet)](#Workbook+deleteSheet) ⇒ [<code>Workbook</code>](#Workbook)
* [.find(pattern, [replacement])](#Workbook+find) ⇒ <code>boolean</code>
* [.moveSheet(sheet, [indexOrBeforeSheet])](#Workbook+moveSheet) ⇒ [<code>Workbook</code>](#Workbook)
* [.outputAsync([type])](#Workbook+outputAsync) ⇒ <code>Promise.&lt;(string\|Uint8Array\|ArrayBuffer\|Blob\|Buffer)&gt;</code>
* [.outputAsync([opts])](#Workbook+outputAsync) ⇒ <code>Promise.&lt;(string\|Uint8Array\|ArrayBuffer\|Blob\|Buffer)&gt;</code>
* [.sheet(sheetNameOrIndex)](#Workbook+sheet) ⇒ [<code>Sheet</code>](#Sheet) \| <code>undefined</code>
* [.sheets()](#Workbook+sheets) ⇒ [<code>Array.&lt;Sheet&gt;</code>](#Sheet)
Expand Down Expand Up @@ -3306,6 +3432,13 @@ Add a new sheet to the workbook.

<a name="Workbook+definedName"></a>

#### workbook.definedName() ⇒ <code>Array.&lt;string&gt;</code>
Gets all defined names scoped to the workbook.

**Kind**: instance method of [<code>Workbook</code>](#Workbook)
**Returns**: <code>Array.&lt;string&gt;</code> - Collection of defined names.
<a name="Workbook+definedName"></a>

#### workbook.definedName(name) ⇒ <code>undefined</code> \| <code>string</code> \| [<code>Cell</code>](#Cell) \| [<code>Range</code>](#Range) \| [<code>Row</code>](#Row) \| [<code>Column</code>](#Column)
Gets a defined name scoped to the workbook.

Expand Down Expand Up @@ -3369,18 +3502,6 @@ Move a sheet to a new position.

<a name="Workbook+outputAsync"></a>

#### workbook.outputAsync([type]) ⇒ <code>Promise.&lt;(string\|Uint8Array\|ArrayBuffer\|Blob\|Buffer)&gt;</code>
Generates the workbook output.

**Kind**: instance method of [<code>Workbook</code>](#Workbook)
**Returns**: <code>Promise.&lt;(string\|Uint8Array\|ArrayBuffer\|Blob\|Buffer)&gt;</code> - The data.

| Param | Type | Description |
| --- | --- | --- |
| [type] | <code>string</code> | The type of the data to return: base64, binarystring, uint8array, arraybuffer, blob, nodebuffer. Defaults to 'nodebuffer' in Node.js and 'blob' in browsers. |

<a name="Workbook+outputAsync"></a>

#### workbook.outputAsync([opts]) ⇒ <code>Promise.&lt;(string\|Uint8Array\|ArrayBuffer\|Blob\|Buffer)&gt;</code>
Generates the workbook output.

Expand Down
Loading