Export to Excel

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Export to Excel

    Hi,

    I have a Jedox Web sheet with a set of Combo Box based filters. I would like to extract the cube data to Excel based on the filters used. What is the best way to go about?

    My client used a private cloud based on AWS for the server infrastructure, and hence, I would not be able to directly store the file and mail it across. Also, the extracted file (using ETL) is a huge one, and hence I cannot mail it across using phpmailer or a ETL mailer.

    A "Save As" kind of method would be very helpful to extract the data.

    Kiran
  • You can zip the extracted file using PHP zip .

    Source Code

    1. /* creates a compressed zip file */
    2. function create_zip($files = array(),$destination = '',$overwrite = true) {
    3. //if the zip file already exists and overwrite is false, return false
    4. //vars
    5. $valid_files = array();
    6. //if files were passed in...
    7. if(is_array($files)) {
    8. //cycle through each file
    9. foreach($files as $file) {
    10. //make sure the file exists
    11. if(file_exists($file)) {
    12. $valid_files[] = $file;
    13. }
    14. }
    15. }
    16. //if we have good files...
    17. if(count($valid_files)) {
    18. //create the archive
    19. $zip = new ZipArchive();
    20. $zip->open($destination,ZIPARCHIVE::OVERWRITE);
    21. //add the files
    22. foreach($valid_files as $file) {
    23. $zip->addFile($file," ".basename($file));
    24. }
    25. //debug
    26. //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;
    27. //close the zip -- done!
    28. $zip->close();
    29. //check to make sure the file exists
    30. return file_exists($destination);
    31. }
    32. else
    33. {
    34. return false;
    35. }
    36. }
    Display All