Importing again.... Import from CSV?

Author Message

Marco Zinn

Wednesday 12 November 2003 3:41:47 pm

Hi there,

I have a nice glossary here in XLS file format, which i'd like to import to ez3.2. My idea is to save it as CSV, which will give me something like this
word1;context;description
word2;context;description

Now, I'd like to import this into ez3, for example into articles (or we could create a new class "glossary term"). Of course, finally, I want to declare everything as "glossary" and use the glossary operator, but for now, i need to import the data.

Does anyone have a script for importing CSVs into a given class?
Or maybe importing data from MySQL tables into a given class (I could create a table from the CSV).
This should be more or less the same as "importfolder.php" from wenyues import scripts, but I'd prefer to just import data from a CSV file to avoid fiddling around with new tables in the live database of ez3.

As we speak about CSV: All content in the CSV will be "plain text" (no HTML or XML), but may contain special characters like öäü (german stuff).

Marco
http://www.hyperroad-design.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:28:27
Script start
Timing: Jan 18 2025 22:28:27
Module start 'layout'
Timing: Jan 18 2025 22:28:27
Module start 'content'
Timing: Jan 18 2025 22:28:27
Module end 'content'
Timing: Jan 18 2025 22:28:27
Script end

Main resources:

Total runtime0.0174 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 587.9141152.6250
Module start 'layout' 0.00800.0029 740.539139.4453
Module start 'content' 0.01090.0046 779.984489.3359
Module end 'content' 0.01550.0018 869.320330.3047
Script end 0.0174  899.6250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002614.6547140.0002
Check MTime0.00126.9302140.0001
Mysql Total
Database connection0.00095.399010.0009
Mysqli_queries0.003419.704430.0011
Looping result0.00000.079410.0000
Template Total0.00158.710.0015
Template load0.00084.711410.0008
Template processing0.00073.947210.0007
Override
Cache load0.00063.365110.0006
General
dbfile0.00042.270880.0000
String conversion0.00000.045240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs