Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: _docx() example error


From   Hua Peng <[email protected]>
From   Hua Peng <[email protected]>
To   [email protected]
To   [email protected]
Subject   Re: st: _docx() example error
Date   Tue, 25 Jun 2013 17:08:05 -0500
Date   Tue, 25 Jun 2013 15:42:15 -0500

David Airey <[email protected]> discovered a mistake in Stata 13's
_docx() documentation.

>
> I was trying to get the Stata 13 _docx() Mata command to work and I get hung
> up by a code error from page 430:
>
>> _docx_table_mod_cell_table(dh, tid, i, 1, 0, tids[i-1], 0)
>wrong number of arguments for _docx_table_mod_cell_table() (9 lines skipped)
>
>I was copying and pasting and thought I got the returns taken care of, but has >anyone else run the example code from the M-5 PDF for _docx() successfully?
>

David is right. The line should be

        _docx_table_mod_cell_table(dh, tid, i, 1, 0, tids[i-1])

instead of

        _docx_table_mod_cell_table(dh, tid, i, 1, 0, tids[i-1], 0)

There is another line which also needs to be changed for the example to
run successfully. The code line right after the paragraph "Now we can combine
them with the header and bottom three rows." should be

        tid = _docx_new_table(dh, cols(mr_table)+4, 2)

instead of

        id = _docx_new_table(dh, cols(mr_table)+4, 2)

We will fix these errors in both the help file and the PDF documentation
in the next update.

Hua
[email protected]
~

On 6/25/2013 12:45 PM, Airey, David C wrote:
I was trying to get the Stata 13 _docx() Mata command to work and I get hung up by a code error from page 430:

_docx_table_mod_cell_table(dh, tid, i, 1, 0, tids[i-1], 0)
wrong number of arguments for _docx_table_mod_cell_table()
(9 lines skipped)

I was copying and pasting and thought I got the returns taken care of, but
has anyone else run the example code from the M-5 PDF for _docx() successfully?

Thanks,

Dave

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index