Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set_time_limit(0);
- ini_set('memory_limit', -1);
- include 'PHPExcel/IOFactory.php';
- convertXLStoCSV('kamaz.xls','output.csv');
- function convertXLStoCSV($infile,$outfile)
- {
- $fileType = PHPExcel_IOFactory::identify($infile);
- $objReader = PHPExcel_IOFactory::createReader($fileType);
- $objReader->setReadDataOnly(true);
- $objPHPExcel = $objReader->load($infile);
- $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'CSV');
- $objWriter->save($outfile);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement