Formula Format Flattening

We create formulas with a level of formatting for readability but when the Workbook is opened, modified and saved, the formatting of said formulas is flattened and all line breaks removed.

Is this by design because it’s quite annoying. We have a lot of lengthy formulas and to lose the readability is quite debilitating.

image.png (6.3 KB)

The formula in that image has numerous line breaks in the LET() statement so that each variable is originally on a different line.

@braddixonorigin
Please try to load workbook with LoadOptions.PreservePaddingSpacesInFormula as the following codes:

LoadOptions loadOptions = new LoadOptions();
loadOptions.PreservePaddingSpacesInFormula = true;
Workbook workbook = new Workbook(dir + "book1.xlsx", loadOptions);

If you still has issues, please upload template file, we will check it soon.

Thanks, that’s perfect, didn’t even know it existed.

@braddixonorigin
Thank you for your feedback. I’m glad that you solved the issue by using the suggested code. If you have any questions, please feel free to contact us at any time.