Possibility to calculate numbers?



  • Hello,

    I have a file which cointains only 1 number in each line, like this:

    5,30
    6,90
    7,50
    12,8
    1,11
    0,50

    Is there any function or script in Notepad++ to get the sum (34,11) of all this lines?
    This would be very helpful. I know, that it is easy to copy it and paste it in Excel and see the sum immediately, but for me it would be very helpful to see it directly in Notepad++.
    Do you have any idea how to get this?
    If necessary I could of course change the decimal sign from , to . before calculating the sum.



  • @Jürgen-Greil

    nothing builtin - but there is a math plugin available, check plugin manager.
    Maybe it can do what you want or install a scripting language plugin like python or lua script
    and write a script doing it.

    Cheers
    Claudia



  • One other way is to use TextFX.
    My version of Notepad++ has under TextFx Tools an “Add up numbers” option.

    For the block:
    5.30
    6.90
    7.50
    12.8
    1.11
    0.501
    TextFX prints the message “Sum=34.1110”


Log in to reply