ursus contionabundo: Drum prüfe, was sich darin findet...

Beitrag lesen

Wenn ich jetzt den Import starte erhalte ich folgende Meldung

    Ungültige Anzahl an Spalten im CSV-Import in Zeile 1.

Das nenn ich mal eine klare Fehlermeldung!

<?php
### Schnelles Skript für die Überprüfung:
$rowDelim = "\r\n";
$colDelim = ';';
$myRowEnd = "\n"; # Unix-Konsole: "\n" | Windows-Terminal: "\r\n" | Browser "<br>";


$rows = file_get_contents('Excel.csv');
$rows = explode($rowDelim, $rows);

$counter = 0;
foreach ( $rows as $row ) {
   $arItems = explode( $colDelim, $row );
   echo "Zeile " . ++$counter . ' hat ' . count( $arItems ) . ' Spalten.' . $myRowEnd;
}

Vergleiche das Ergebnis mit Deinen Erwartungen, die sich mit

SHOW CREATE TABLE tabelle\G

manifestieren bzw. korrigieren lassen.

0 50

CSV Import

Bernd
  • datenbank
  1. 0
    pl
    1. 0
      Bernd
  2. 0
    Rolf B
    1. 0
      pl
      1. 0
        Rolf B
        1. 0
          pl
          1. 0
            Rolf B
            1. 0
              pl
              1. 0

                Hoster mit von außen erreichbarer MySQL-DB

                ursus contionabundo
            2. 0
              Bernd
  3. 0
    Tabellenkalk
    1. 0
      dedlfix
  4. 0

    CSV Import Feldnamen

    pl
  5. 0

    CSV Import will CSV - und nicht irgendetwas.

    ursus contionabundo
    1. 0
      pl
  6. 0
    klawischnigg
    1. 0
      Tabellenkalk
      1. 0
        dedlfix
        1. 0
          Tabellenkalk
          1. 0
            dedlfix
      2. 0
        klawischnigg
  7. 0
    Bernd
    1. 0
      pl
      1. 0
        Bernd
        1. -1
          pl
          1. 0
            Bernd
            • datenbank
            • php
            1. 0
              pl
              1. 2
                ursus contionabundo
                1. 0
                  pl
                  1. 3
                    ursus contionabundo
                    1. 0
                      pl
                      1. 0
                        ursus contionabundo
                        1. 0
                          pl
                          1. 0
                            ursus contionabundo
            2. 1
              Camping_RIDER
          2. 0
            Rolf B
            1. 0
              pl
              1. 4

                Nicht Dein Ernst - oder?

                ursus contionabundo
                1. 0
                  pl
    2. 0
      dedlfix
      1. 0
        Bernd
        1. 0
          dedlfix
          1. 0
            Bernd
            1. 0
              dedlfix
              1. 0
                Bernd
        2. 0

          Drum prüfe, was sich darin findet...

          ursus contionabundo
    3. 0
      ursus contionabundo
      1. 0
        Tabellenkalk
        1. 0

          sicher?

          ursus contionabundo