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

Feature request: worksheet_write_comment() #38

Closed
jmcnamara opened this issue Dec 10, 2015 · 10 comments
Closed

Feature request: worksheet_write_comment() #38

jmcnamara opened this issue Dec 10, 2015 · 10 comments

Comments

@jmcnamara
Copy link
Owner

jmcnamara commented Dec 10, 2015

Add worksheet_write_comment() function like the Python XlsxWriter Worksheet method write_comment().
See https://xlsxwriter.readthedocs.io/working_with_cell_comments.html

  • Difficulty: 5 (Easy 1 - 5 Hard)
  • Priority: 3 (High 1 - 5 Low)

Add +1 as a comment to vote for this feature and to get an update when it is implemented.

If you would like to make a donation to accelerate this feature you can do so via PayPal or contact me directly. Currently $0 of $800.

@jmcnamara jmcnamara self-assigned this Dec 10, 2015
@jmcnamara jmcnamara added this to the Phase5 milestone Dec 10, 2015
@scottyd57
Copy link

I would be willing to look into this feature. I need this to process my excel files. Let me know if I can help.

@jmcnamara
Copy link
Owner Author

Let me know if I can help.

Thanks for the offer. Libxlsxwriter is mainly a port of the Python and Perl libraries that I wrote. I have the tests, docs and an API so in general I don't need help.

What I do need is time to work on it and I've had even less of that recently than usual.

@jmcnamara
Copy link
Owner Author

jmcnamara commented Aug 6, 2018

Since I've had a few requests about this I've added a note about making donations to prioritize this feature.

@LifeToDevice
Copy link

+1

@sevenyang2019
Copy link

can libxlsxwriter support the function of write_comments now ?

@jmcnamara
Copy link
Owner Author

@sevenyang2019 No. This issue would be closed if it was completed or updated if there was some progress.

jmcnamara added a commit that referenced this issue Jan 5, 2020
jmcnamara added a commit that referenced this issue Jan 5, 2020
jmcnamara added a commit that referenced this issue Jan 5, 2020
jmcnamara added a commit that referenced this issue Jan 5, 2020
jmcnamara added a commit that referenced this issue Jan 5, 2020
@jmcnamara
Copy link
Owner Author

jmcnamara commented Jan 5, 2020

The initial version of comment support is available on the "vml" branch. You can now add comments to libxlsxwriter cells as follows:

#include "xlsxwriter.h"

int main() {

    lxw_workbook  *workbook  = workbook_new("comments1.xlsx");
    lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);

    worksheet_write_string( worksheet, 0, 0, "Hello" , NULL);

    worksheet_write_comment(worksheet, 0, 0, "This is a comment");

    return workbook_close(workbook);
}

And get output like this:

comments1

It only works when lxw_workbook_options constant_memory = LXW_FALSE (which is the default).

I'll be adding more options and documentation in the next week or so but if anyone is feeling brave and would like to try it let me know how you get on.

The eventual functionality will be like XlsxWriter: https://xlsxwriter.readthedocs.io/working_with_cell_comments.html

jmcnamara added a commit that referenced this issue Jan 5, 2020
jmcnamara added a commit that referenced this issue Jan 6, 2020
jmcnamara added a commit that referenced this issue Jan 6, 2020
jmcnamara added a commit that referenced this issue Jan 6, 2020
jmcnamara added a commit that referenced this issue Jan 6, 2020
jmcnamara added a commit that referenced this issue Jan 7, 2020
jmcnamara added a commit that referenced this issue Jan 7, 2020
@jmcnamara
Copy link
Owner Author

jmcnamara commented Jan 7, 2020

I've added some additional functionality, more tests, and merged this up to master. Docs and further examples to be added. Note, please don't use the vml branch anymore since it has an issue.

jmcnamara added a commit that referenced this issue Jan 10, 2020
Added support for cell comments in constant_memory mode
and also refactored the internal data structure for
handling comments.

Issue #38
jmcnamara added a commit that referenced this issue Jan 10, 2020
Added support for cell comments in constant_memory mode
and also refactored the internal data structure for
handling comments.

Issue #38
jmcnamara added a commit that referenced this issue Jan 11, 2020
Added support for cell comments in constant_memory mode
and also refactored the internal data structure for
handling comments.

Issue #38
jmcnamara added a commit that referenced this issue Jan 11, 2020
@jmcnamara
Copy link
Owner Author

The final version of this feature is now on master with docs and examples if anyone wants to try it. I will push it out to the packagers in the next few days.

@jmcnamara
Copy link
Owner Author

Upstream in version 0.92/0.93.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants