Actions

Alternatives to the LimeSurvey import function/ja: Difference between revisions

From LimeSurvey Manual

(Updating to match new version of source page)
(Updating to match new version of source page)
Line 57: Line 57:
=Importing surveys from other applications=
=Importing surveys from other applications=


We are often getting requests to import a survey from other applications or survey providers. The problem is that providers like SurveyMonkey lock you in - it is not possible to export the survey structure from SurveyMonkey, only the response data. So you can see that using non-open propietary software or providers can be a bad idea in the first place.
We are often getting requests to import a survey from other applications or survey providers. The problem is that providers like SurveyMonkey lock you in - it is not possible to export the survey structure from SurveyMonkey, only the response data. So you can see that using non-open proprietary software or providers can be a bad idea in the first place.

Revision as of 08:25, 11 October 2013


「新規アンケートを作成」画面で、以前に出力したアンケートをインポートすることができます。「参照」ボタンを押して、SQL形式またはCSV形式のファイルを選択します。次のフォーマットのファイルがインポートできます:

  • v0.98-1.0:LimeSurveyで作成された.SQLファイル
  • v1.45以降:LimeSurveyで作成された.CSVファイル

この方法で、古いバージョンで作成したアンケートも新しいバージョンに移行できます。

インポート時には、アンケートやグループ、質問、回答、条件IDなどの番号の付け替えが「お利口に」(と、あえて書きます)行われ、お互いうまくマッチするようになります。詳細はアンケートの出力を参照してください。


v1.50からは、コマンドライン(またはシェル)からアンケートのインポートができるようになりました。この機能を利用するには、シェルにアクセス可能で、またPHPインタープリタがシェルから実行できるように設定されている必要があります。この機能は、アンケートが非常に大きくて、インポートしようとするとweb版ではタイムアウトしてしまう場合に便利です。シェルで limesurvey/admin フォルダに移動し、次のコマンドを実行します。

php cmdline_importsurvey <File to import> <user> <password>

<File to import> はインポートするファイル名、

<user> はアンケートを作成する権限を持つユーザ名、

<password> は当該ユーザのパスワードです。

パラメータを見るには次のコマンドを実行します:

php cmdline_importsurvey -h


Translated from English version, No.14

If you have previously exported a survey structure, you can import it from the "Create, import, or copy survey" screen. Click on the import button. Click on the browse button to choose the file, and then click on the button. The import process reads the following formats:

  • .LSA files, .TXT files
  • v1.50 or later .CSV files created by LimeSurvey
  • v1.90 or later .LSS files created by LimeSurvey

That way you can import old surveys from previous version. The import 'intelligently' re-numbers the survey, group, question, answer and condition IDs so that they all match each other - no existing surveys will be overwritten. See section on Exporting a survey structure for more information.

Import using the commandline utility

Since version 1.50 it is possible to import surveys from the command line (or shell). To use this functionality you have to have access to the shell and the PHP interpreter has to be configured to allow shell execution of scripts.

This functionality is useful when you have timeout problems with the web version that could happen when you have very long surveys to import.

To use it, in the shell go to the limesurvey/admin folder and execute:

php cmdline_importsurvey <File to import> [<user> <password>]
  • <File to import> has to be one of the described above
  • <user> has to be a user with the right to create surveys
  • <password> the password for the user
    *<user> and <password> are only required if the control access is active

If you need to see the parameters you can execute:

php cmdline_importsurvey -h

Importing surveys from other applications

We are often getting requests to import a survey from other applications or survey providers. The problem is that providers like SurveyMonkey lock you in - it is not possible to export the survey structure from SurveyMonkey, only the response data. So you can see that using non-open proprietary software or providers can be a bad idea in the first place.