Hi STATALIST,

I made an excel file using following codes:

Code:
export excel n  ///
            using "C:\HRCT dose\RMH.xlsx" ///
             sheet("RMH") sheetreplace firstrow(variables)
I want to add a new variable to this file:

Code:
export excel HRCT2 ///
    using "C:\HRCT dose\RMH.xlsx" //
    sheet(RMH) firstrow(variables) sheetmodify

or

Code:
export excel HRCT2 ///
    using "C:\HRCT dose\RMH.xlsx" //
    sheet(RMH, modify) firstrow(variables)
However, n was replaced by HRCT2.

Could you please advice me on how I can add a new variable to an existing excel file using export excel?

what's difference between replace and modify in export excel command?

Regards,