---
title: "Creating a survey from a CSV with previous data"
url: "https://openforis.support/questions/800/creating-a-survey-from-a-csv-with-previous-data"
tags: ["saiku", "collect"]
status: "answered"
score: 0
answer_count: 1
asked: "2016-10-13T23:55:02"
last_activity: "2016-10-14T10:13:36"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Creating a survey from a CSV with previous data

Asked by collector on 2016-10-13

Hello Open Foris team,

I have a **CSV** file with data from a previous survey and I would like to create a **Collect survey** from it. 

I would like to import the data from the CSV in order to be able to analyse it through Saiku, it is a great product for analysis! Also I would like to use Collect for the second round of data collection for this survey

Is there an easy way to do this or do I need to manually create the survey??

Thanks!


## Answer (score 0, by Stefano (OF) on 2016-10-14)

Link: https://openforis.support/questions/800/creating-a-survey-from-a-csv-with-previous-data/802

In the **Survey Designer** it's possible to generate a survey starting from a CSV or Excel file.
  
First you have to create a new blank survey, then start to edit it and got to the top right corner where the **Advanced functions** are and select **Import attributes from Excel/CSV file**; you will be asked to specify in which entity you want to define the new attributes. The column names of the CSV file will be used to define the attribute names and Collect will try to guess the attribute type according to the content of the columns (you can convert later every attribute to a different type if needed). 

![alt text][1]


![alt text][2]


Optionally you can define attribute labels in the second row of the CSV file and select the option **Labels in second row** before starting the import!!! This way the first row will contain the names of the attributes and the second will contain the labels (what you see in the forms)

IMPORTANT:
----------

if you have 3 CSV files like **cluster**.csv, **plot**.csv and **tree**.csv that correspond to a hierarchical structure of entities **cluster/plot/tree**, first you have to define the entities cluster (sampling unit), plot and tree, then you can import the attributes in each of these entities.  
**EXAMPLE:**

    id,region,land_use,distance
    "ID of plot","Region", "Land Use in the center of the plot", "Distance to road"
    1,Umbria,Forest,10
    2,Lazio,Forest,1
    ...

 


Thanks,  
Open Foris Team


  [1]: http://www.openforis.org/support/upfiles/2016-10-14_09-48-54.png
  [2]: http://www.openforis.org/support/upfiles/chrome_2016-10-14_10-06-58.png
