Search code examples
c++excelms-wordconvertersheader-files

Generating MS Word tables from C headers


I have to create typical tables with offsets, register addresses, sizes, comments in MS Word for system level software. I'd like to automate this process. For example, I can write special comments in *.h header, it will contain constants, it will be parsed by some utility, which will generate tables for MS Word (or, at least, for MS Excel).

The solution should be crossplatform, no VBA is expected. I suppose that there are some tools for low-level programmers. Have you met such converters? I don't want to reinvent the wheel.

Never mind, if the input file is not a C header. For example, the scheme "input_file->header_file and input_file->table(s)" is OK too.


Solution

  • http://www.doxygen.nl/manual/output.html

    There's RTF generation option in doxygen. You can use it with Word, and you can use any RTF->DOCX converter too(I think this is way easier task, to be honest.).

    https://github.com/tobya/DocTo - this is one such converter, check it out.