0

Well, we can parse csv file to PHP array as follows.

        $arr = [];
        $file = $_FILES['file']['tmp_name'];
        $handle = fopen($file, "r");
        while (($filesop = fgetcsv($handle, 1000, ",")) !== false) {
            $fields = array(
                'col1' => $filesop[0],
                'col2' => $filesop[1],
                'col3' => $filesop[2]
            );
            array_push($arr, $fields);
        }

Similar to above method, Is there any simple direct techniques to parse excel file to array (other than PHPExcel library)? The above code itself creates the array from excel file but data is in encrypted format.

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.