title: Convert excel to csv and import data to php
body: <p>I need to import data from excel to php, as I heard It's so hard, so I need convert excel file to csv. But I have the problem, I can't convert successfully, when I trying I get error message: 
  <img src="https://i.stack.imgur.com/2bECF.png" alt="errorcsv"></p>
  
  <p>My original excel file looks like:
  <img src="https://i.stack.imgur.com/C71bo.png" alt="original"></p>
  
  <p>And after convert to csv:
  <img src="https://i.stack.imgur.com/XNx5K.png" alt="afterconvert"></p>
  
  <p>What's the problem? I need to convert and keep the same format.</p>
  
  <p>My php file for csv reading looks like:</p>
  
  <pre><code>&lt;?php
  $row = 1;
  if (($handle = fopen("test.csv", "r")) !== FALSE) {
      while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
          $num = count($data);
          echo "&lt;p&gt; $num fields in line $row: &lt;br /&gt;&lt;/p&gt;\n";
          $row++;
          for ($c=0; $c &lt; $num; $c++) {
              echo $data[$c] . "&lt;br /&gt;\n";
          }
      }
      fclose($handle);
  }
  ?&gt; 
  </code></pre>
  
  <p>And result how It looks like after reading in php: 
  <a href="http://www.eurokos.lt/zaidimas/test/test.php" rel="nofollow noreferrer">example</a></p>
  
  <p>So I need any ideas how to convert xls to csv without loosing format or how to import data from excel file to php. Anyone can help me, please? Thank you.</p>