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

add function to remove or update comment in a cell #849

Closed
coreyzzp opened this issue May 26, 2021 · 9 comments
Closed

add function to remove or update comment in a cell #849

coreyzzp opened this issue May 26, 2021 · 9 comments
Labels
enhancement New feature or request
Projects

Comments

@coreyzzp
Copy link

No description provided.

@coreyzzp
Copy link
Author

when we try to add comment to a cell with comment, when open the excel file, the excel program will complain about 'there is an error occur, but we has recovery from it'

@xuri
Copy link
Member

xuri commented May 27, 2021

Hi @coreyzzp, thanks for your feedback, could you provide any code and attachments to reproduce this issue?

@xuri xuri added the needs more info This issue can't reproduce, need more info label May 27, 2021
@coreyzzp
Copy link
Author

coreyzzp commented May 27, 2021

func TestCreateExcelAndUpdateComment(t *testing.T) {
	target := "test.xlsx"
	target2 := "test-after.xlsx"
	{
		var err error
		fd := excelize.NewFile()
		err = fd.AddComment("Sheet1", "A1", fmt.Sprintf(`{"author":"Excelize: ","text":"This is a comment" }`))
		require.Nil(t, err)
		err = fd.SaveAs(target)
		require.Nil(t, err)
		// here open test.xlsx is find
	}
	{
		fd, err := excelize.OpenFile(target)
		require.Nil(t, err)
		err = fd.AddComment("Sheet1", "A1", fmt.Sprintf(`{"author":"Excelize: ","text":"hello world"}`))
		require.Nil(t, err)
		err = fd.SaveAs(target2)
		require.Nil(t, err)
		// now open test-after.xlsx an error popup
	}
}

open test.xlsx
image

open test-after.xlsx

image
image

@coreyzzp
Copy link
Author

it will be good to has a method to delete or update comment in a cell

@xuri
Copy link
Member

xuri commented May 27, 2021

This lib doesn't support modify comment and set the comment repeatedly on one cell currently. I've add this feature support in the Roadmap.

@xuri xuri added enhancement New feature or request and removed needs more info This issue can't reproduce, need more info labels May 27, 2021
@coreyzzp
Copy link
Author

thx~

@Jonham
Copy link
Contributor

Jonham commented Jan 9, 2022

find an article about "comments" and "notes": The difference between threaded comments and notes

@FoeverA0
Copy link

[WeOpen Star] I would like to help

1 similar comment
@NaturalGao
Copy link
Contributor

[WeOpen Star] I would like to help

@NaturalGao NaturalGao mentioned this issue Aug 14, 2022
10 tasks
@xuri xuri closed this as completed in 76f3368 Aug 19, 2022
@xuri xuri added this to Feature in v2.6.1 Aug 19, 2022
rodoard pushed a commit to sheetrocks/excelize that referenced this issue Aug 26, 2022
…omment (qax-os#1317)

- Update unit tests for the delete comment
- Add 3 errors function for error messages
xuri pushed a commit to carbin-gun/excelize that referenced this issue Oct 9, 2022
…omment (qax-os#1317)

- Update unit tests for the delete comment
- Add 3 errors function for error messages
xuri pushed a commit to JDavidVR/excelize that referenced this issue Jul 11, 2023
…omment (qax-os#1317)

- Update unit tests for the delete comment
- Add 3 errors function for error messages
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
…omment (qax-os#1317)

- Update unit tests for the delete comment
- Add 3 errors function for error messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
v2.6.1
Feature
Development

No branches or pull requests

5 participants