Ask Zendframework have import data to the database, export the database interface?

Source: Internet
Author: User
Zendframework have import data to the database, export the database interface?
For example, import from Excel, export to Excel. Thank you all first!

------Solution--------------------
Never met, help top!!!
------Solution--------------------
Yes, multi-file import renaming, need the latest framework package (about 1.90 or more can)

$upload = new Zend_file_transfer_adapter_http ();
$upload->setdestination (Getappfilepath (C (' path.excel_upload ')));

$data = null;
$uploadedFilename = ";

try {
Upload received file (s)
$upload->receive ();
$uploadedFilename = $upload->getfilename (' excelupload ');
} catch (Zend_file_transfer_exception $e) {
$e->getmessage ();
Todo:set a notice and redirect URL
}

if (file_exists ($uploadedFilename)) {
$errorCode = error_reporting ();
Error_reporting (E_all & ~e_notice);

Filefacade->processimport ($uploadedFilename);
Require_once (Getappfilepath ('/application/util/excel_reader3.php '));
$data = new Spreadsheet_excel_reader ();
Error_reporting ($errorCode);
Set encoding
$data->setoutputencoding (' utf-8 ');
$data->read ($uploadedFilename);
------Solution--------------------
It's like wood.
Google has an Excel project, but also simple, but easy to use
There are also phpexcel projects, Sourceforte, which is saved as a file time is relatively slow, powerful, large data (>10w) should be considered carefully
Python has an Excel module, very good, look at others object-oriented,
Suggest that Excel learn from it
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.