title: insert excel data into database in codeigniter
body: <p>i need to insert the excel sheet data into my database using codeigniter.For this i have tried</p>
  
  <pre><code>&lt;?php
  include 'reader.php';
  $excel = new Spreadsheet_Excel_Reader();
  ?&gt;
  &lt;table&gt;
  &lt;?php
  $excel-&gt;read('first_data.xls');    
  $x=1;
  while($x&lt;=$excel-&gt;sheets[0]['numRows']) {
    echo "\t&lt;tr&gt;\n";
    $y=1;
    while($y&lt;=$excel-&gt;sheets[0]['numCols']) {
      $cell = isset($excel-&gt;sheets[0]['cells'][$x][$y]) ? $excel-&gt;sheets[0]['cells'][$x][$y] : '';
      echo "\t\t&lt;td&gt;$cell&lt;/td&gt;\n";  
      $y++;
    }  
    echo "\t&lt;/tr&gt;\n";
    $x++;
  
  }
  
  ?&gt;    
  &lt;/table&gt;&lt;br/&gt;
  </code></pre>
  
  <p>Through this i can retrieve excel data and print it.
  how to store in database one by one as row.</p>
  
  <pre><code>State   1972-1973   1973-1974   1974-1975   1975-1976   1976-1977   1977-1978   1978-1979   1979-1980   1980-1981   1981-1982
  Alabama $733,750    $1,066,300  $1,136,244  $1,343,670  $1,476,307  $1,642,927  $1,507,315  $1,849,825  $2,402,873  $2,079,000 
  Alaska  $1,019,000  $1,100,000  $1,180,500  $1,172,300  $1,415,300  $1,411,700  $1,666,500  $2,026,400  $3,409,800  $7,200,000 
  Arizona $225,117    $226,000    $242,000    $212,200    $553,600    $905,200    $1,100,300  $1,232,600  $1,409,600  $1,557,000 
  Arkansas    $890,496    $1,173,304  $1,193,362  $1,735,266  $1,824,536  $1,929,071  $2,090,590  $2,173,595  $2,042,632  $2,203,864 
  </code></pre>