I have a customer who requested automatic generation of word document. I managed to write the library to do this, so this is not the problem. The requested document is to contain a table - this table has constant number of rows, and variable number of columns, and there should be as much columns on each page as possible. Is there any way to force word to break the page beetween the columns, i.e. if there is no space for another column, simply move it to the next page?

I am aware that the word table is represented in the similar way to html tables (it is table -> rows -> cells) within document.xml file. So far the closest I got is to have normal table with a text rotated 90 degrees, but this is pretty hacky. Is there any better way to do this?

  • 1
    Your idea is probably the best and the only way to achieve this. Word treats table rows as separate entities whereas in its mind there is no such thing as a "column", just a collection of cells belonging to rows in the same line so I doubt there is any way to have them behave like what you want. I suggest you stick with the method you are currently using. – Adam Mar 9 '14 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.