Announcement

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

  • Problem with "collect export" - Excel file gets damaged

    Dear all,

    I have used "collect export" for the first time to save tables in an Excel file after the "table" command.
    On the first run, when a new Excel file is created, everything always works fine. But the very next time, it doesn't work anymore.
    When I then want to open the Excel file, I get the message "We found a problem with some content in 'File.xlsx'. Do you want us to try to recover as much as we can?" When I click on "Yes", I get "'File.xlsx' is locked for editing".

    The problem does not exist with one-way tables, e.g.

    table var1 , statistic(median var2)
    collect export File.xlsx, sheet(Data) as(xlsx) cell(A1) open modify


    In this case, I can run the Do-File as often as I want without any problems.

    With two-way tables, however, it is different, e,g,

    table var1 var3, statistic(median var2)
    collect export File.xlsx, sheet(Data) as(xlsx) cell(A1) open modify


    Then the error messages mentioned above appear. Apparently there is a problem when Stata writes the variable name of var3 into the Excel file and connects cells in the process.

    Is this problem known and, if so, is there a solution to fix it?

    Many thanks in advance.
    Georg

  • #2
    Report this to [email protected], Add the information from running -about-

    Comment


    • #3
      Thank you for the suggestion.
      I have done this in the meantime - the technical support was able to reproduce the problem and has passed it on to the developers.
      I will report on how things are progressing.

      Comment

      Working...
      X