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

[BUG] worksheet.insertRow is not a function #1333

Closed
KazakovKirill opened this issue Jun 16, 2020 · 7 comments
Closed

[BUG] worksheet.insertRow is not a function #1333

KazakovKirill opened this issue Jun 16, 2020 · 7 comments

Comments

@KazakovKirill
Copy link

KazakovKirill commented Jun 16, 2020

🐛 Bug Report

When trying to use insertRow (or insertRows) method I getting error:
TypeError: worksheet.insertRow is not a function

Lib version: "4.0.1"

Steps To Reproduce

const workbook = new Excel.Workbook()
const worksheet = workbook.addWorksheet('demo')
worksheet.insertRow(1, [3, 'Sam', new Date()])

The expected behaviour:

https://github.com/exceljs/exceljs#insert-rows

@KazakovKirill
Copy link
Author

Seems like this is a documentation issue: there is a deprecated methods published in documentation @ github.com/exceljs/exceljs

@wereHamster
Copy link

https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md doesn't mention anything about insertRow.

@Alek-S
Copy link

Alek-S commented Jun 22, 2020

Getting this is well, so is insertRow depreciated in v4?

@Alek-S
Copy link

Alek-S commented Jun 22, 2020

Looks like they had a PR recently for insertRow in #1324 that was merged, probably just haven't cut a new version tag yet to get it in since that went in 9 days ago, and the last version was 18 days.

@Subhajitdas298
Copy link
Contributor

Yea, this method is new. Though, for Typescript users, there is a small bug, of missing optional operator in styleOptions.
New version is released. You can use it. Just use 'n' in styleOptions parameter, until #1358 or alternative is merged.

@Subhajitdas298
Copy link
Contributor

Also, I would suggest directly taking from source, rather than releases, if possible. As, it would contain latest features and fixes.

@alubbe
Copy link
Member

alubbe commented Jun 30, 2020

Closing this, as we just need to wait for the release: #1362

@alubbe alubbe closed this as completed Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants