Export data in Stata

Hello!
How to export data from Kobo directly to Stata software?
Thanks

Hi @msodjinou,

The discussion thread should help sort out your problem:

GOOD DAY!

Hello!
Is sommes problem on the Kobo platform?
It is very difficult to work on the platform since this morning.
Thanks

Hi @msodjinou,

The problem has been solved and should be working smoothly now!

GOOD DAY!

Hello!
I remarque that if the database is too large, the command kobo2stata don’t work.
Thanks to revise it.

I have database which contain 2099 variables.

Hi @msodjinou,

Could you provide feedback to @FSg in his original post From KoBo to Stata (new solution) so that he could respond to you on the same.

GOOD DAY!

This is not a limitation of kobo2stata but of the Stata version you use. Stata IC allows only up to 2,048 variables. Stata SE up to 32,767. Stata MP up to 120,000 variables.
In other words, even if you try to import your dataset into Stata IC without kobo2stata, it will not work.

1 Like

Yes. I have stata version 14 SE. but thé dame message appear.

Why?

Thanks to help me.

--------------------------------©-----------------------------

Agricultural economist. Msc.

M&E specialist.

CAPI designer & Data analyst.

+229 96110037

Profile: https://www.researchgate.net/profile/Koffi_Moise_Bienvenu_Sodjinou/research

Twitter: @MoseSodjinou1

Web: www.casad-benin.org

Yes. I have stata version 14 SE. but thé same message appear. My data base contains 2099 variables.
Why?
If you want, I will send the data base to you for help me.

Thanks to help me.

If you send me your database and xlsform (exported from Kobo exactly as specified in the kobo2stata help file) via email to kobo2stata@gmail.com, I‘ll be happy to take a look. If you are concerned about data confidentiality, please note I don‘t need the full dataset. The first row containing variable names and another one or two rows of sample data will usually suffice to identify the problem.

Also, please stop creating new posts for the same issue (you have now created three posts on this forum with the exact same question). You will not be helped faster by spamming. Please understand that kobo2stata is a user-written contribution and not commercial software. Your problem will be considered if and when time allows.

1 Like

Hi @msodjinou

Another way to import your data directly to stata is by using API and import delimited command in Stata. e.g. “import delimited https://kc.kobotoolbox.org/api/v1/data/xxxxxxx.csv

TY.
bernieseville

1 Like

Hi @bernieseville
Just to be sure, this stata command would require that the data in question is actually publicly available otherwise it would not work. Kindly confirm that is the case whenever you use it?

Stephane

1 Like

Hi, this thread was useful as I’m trying to import data from Kobo into Stata. I can import the data using @bernieseville’s recommendation, but then I was hoping to be able to run kobo2stata on it. Here are the steps I am using:

  1. import delimited using “https://kc.kobotoolbox.org/api/v1/data/XXXXXX.csv” // import my dataset from Kobo Toolbox
  2. export excel using “[path]/[filename].xlsx”, firstrow(variables) replace
  3. kobo2stata using “filename.xlsx”, xlsform[formpath]

The import and export work fine. However, the kobo2stata command results in only pulling in the ‘settings’ tab as the dataset, not the actual data. I realize the kobo2stata command has instructions about deactiving the ‘groups in headers’ - is this the barrier here? Any solutions?
thanks,
Hannah