Hi all,
Sorry if my question may seem basic but unfortunately I wasnt able to find a solution anywhere.
I have data in an excel sheet (xlsx) in several tabs which I would like to import into stata. I am using the following command to import asset prices:
import excel "C:\Users\....\data.xlsx", sheet("Price") firstrow
The problem is that after imported in stata, its treating it as a string and not a number. I see variable type is "str17" and format "%17s" whereas I believe it should be "double". Where is this problem coming from? Must I somehow format my excel sheet to start with? Probably related to this issue, often a number such as 72.34 in excel appears as 72.34000000000001 once in stata.
many thanks,
Marc
Sorry if my question may seem basic but unfortunately I wasnt able to find a solution anywhere.
I have data in an excel sheet (xlsx) in several tabs which I would like to import into stata. I am using the following command to import asset prices:
import excel "C:\Users\....\data.xlsx", sheet("Price") firstrow
The problem is that after imported in stata, its treating it as a string and not a number. I see variable type is "str17" and format "%17s" whereas I believe it should be "double". Where is this problem coming from? Must I somehow format my excel sheet to start with? Probably related to this issue, often a number such as 72.34 in excel appears as 72.34000000000001 once in stata.
many thanks,
Marc
Comment