Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • export excel, sheet and xls document

    Hi,

    I have been experiencing difficulties with export excel when used with xls documents (not xlsx). The reason I prefer xls docs over xlsx is that it is twice faster to work with. To summarize my issue, I do something like:

    Code:
    forval i=1/20 {
    export excel varlist using doc.xls, sheet(x`i', modify)
    }
    I am updating my doc.xls with new worksheets containing new data. The worksheets are not especially big but the doc.xls is (as it contains links and stuff).

    It works fine for a while but after a few iteration I get the following error:
    r(603).​​​​​​
    file doc.xls could not be loaded

    The weird think is that I can still open the doc.xls file on excel and it looks ok but after getting this message, I cannot upload any new worksheet using stata and export excel. I need to simply suppress my doc.xls and start all over again.

    I never get this problem with doc.xlsx file. While much larger, doc.xls files are much faster to work with.

    Do you have any idea what is going on?

    PS: I suspected my DROPBOX first but after interrupting the sync, it is not the culprit.




  • #2
    Originally posted by Adrien Bouguen View Post
    Do you have any idea what is going on?
    Maybe this?
    but the doc.xls is (as it contains links and stuff).
    You might try slowing the I/O down a little in order to give the machinery a breather and catch up the reads with the writes.

    Try something like
    Code:
    forvalues i = 1/20 {
        export excel <varlist> using doc.xls, sheet(x`i', modify)
        sleep 2500
    }

    Comment

    Working...
    X