masaccio / numbers-parser

Python module for parsing Apple Numbers .numbers files
MIT License
201 stars 14 forks source link

Saving negative numbers #49

Closed ChrisKing4 closed 1 year ago

ChrisKing4 commented 1 year ago

I created a spread sheet in Numbers that contained both positive and negative numbers. In a python script using the numbers-parser, I loaded that document and saved it back out to a new file without modifying it. When I opened the new document in numbers, all the negative numbers have been clamped to zero.

masaccio commented 1 year ago

I can’t spot anything eyeballing the code just now so will take a proper look next weekend and publish an update. If you have a moment to attach a failing example that would help just in case it turns out to be an edge case.

ChrisKing4 commented 1 year ago

Archive.zip

I have included my test data in a file called negtest and the results I get in a file called result.numbers.

This code I used is simply:

from numbers_parser import Document

doc = Document("negtest.numbers") doc.save("result.numbers")

masaccio commented 1 year ago

Fixed in v3.9.6.