-
-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Unable to add more than one cell comment #2779
Comments
What version of Excel are you using? Can you share the bad file as well as the comment structure for one of the comments that was removed? Excel recently changed how comments worked, and SheetJS shifted to support the new threaded comments, so it's possible the fallback isn't compatible with some older versions. |
Thank you for responding i have used the latest version now I'm not getting error, but Thereaded comments are coming blank now |
What version of Excel are you using? Also, can you test the attached file? comments_example.xlsx It was generated as follows: var wb = XLSX.utils.book_new();
var ws = XLSX.utils.aoa_to_sheet([["A1"], ["A2"]]);
if(!ws.A1.c) ws.A1.c = [];
ws.A1.c.push({a:"SheetJS", t:"This comment is visible"});
if(!ws.A2.c) ws.A2.c = [];
ws.A2.c.hidden = true;
ws.A2.c.push({a:"SheetJS", t:"This comment will be hidden"});
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
var ws = XLSX.utils.aoa_to_sheet([["A1"], ["A2"]]);
if(!ws.A1.c) ws.A1.c = [];
ws.A1.c.push({a:"SheetJS", t:"This is not threaded"});
if(!ws.A2.c) ws.A2.c = [];
ws.A2.c.hidden = true;
ws.A2.c.push({a:"SheetJS", t:"This is threaded", T: true});
ws.A2.c.push({a:"JSSheet", t:"This is also threaded", T: true});
XLSX.utils.book_append_sheet(wb, ws, "Sheet2");
XLSX.writeFile(wb, "comments_example.xlsx") |
The updated logic is now aligned with how the Pro builds write comments. SheetJSThreadedComments.xlsx |
I m trying to add cell comments in my angular project but and error pop shows
The text was updated successfully, but these errors were encountered: