1. Problem Description
Currently the project is to use JAVA plus office to generate documentation. The main problem is that, because it is the English document, if the document format is:
"Address a"
"Location of"
"Address Three"
Location of empty and sometimes and sometimes not empty, empty when this line will be blank line, the user can not accept, so the method needs to deal with.
2. Solution
If else that comes with the use of office functions, will "address a" and "address two" on the same line. When it is not empty, newline characters are inserted. As follows:
"Address a" {IF "address two" = "" "" Location of "" "[herein, in the word Press Enter] " address two ""}
It should be noted that the braces must be generated by Ctrl + F9. Secondly, this method can solve require users to use different fonts for different situations