Results 1 to 16 of 16

Thread: How to create a csv file , excel file?
      
   

  1. #1
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Question How to create a csv file , excel file?

    Hi folks,

    I have a databse and have a page with certain queries on it.

    Those queries provide me with a table that I can see on a web page.

    I would like to have the option of, when pressing a button (CSV) or (EXCEL) the contnets of the page in the table will be dumped to the file as indicated.

    I hope this makes sense - I look forward to your ideas and input

  2. #2
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: How to create a csv file , excel file?

    You have to either create your own script, or use one of the already developed PHP classes, customizing it to your needs.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  3. #3
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Default Re: How to create a csv file , excel file?

    Hi George,

    Thanks for the advice.

    Where do I find these PHP classes?

  4. #4
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: How to create a csv file , excel file?

    http://www.phpclasses.org/

    Please note that it is not easy to work with classes, and they, anyway, require some code to be written in order to use the class.

    Or, Google it, to find some script that does this.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  5. #5
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Thumbs up Re: How to create a csv file , excel file?

    Hi George,

    Thanks for the link. I will go have a look and if I need more assitance I will drop you a mail

  6. #6
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Default Re: How to create a csv file , excel file?

    Is my understanding correct in that if I bring information to a webpage then I can create a button (CSV or EXCEL) and once pressed it will dump the information on that is in table form on that web page?

  7. #7
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: How to create a csv file , excel file?

    Incorrect.

    Some classes that I mentioned support this feature, BUT only if you have defined in the background the parameters that will allow the class to work correctly.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  8. #8
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Default Re: How to create a csv file , excel file?

    Thanks George.

    Back to sqaure 1 for me as I do not have this understanding or experiance to do this myself

  9. #9
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: How to create a csv file , excel file?

    Rob, most scripts / functions / classes that you can find on the nest are generic ones, that will do this and much more, but of course, they can not read your mind. They are built in a parametric way so that each user can get from them what he needs with just a few lines of code to call the function or class.

    With a minimum of php experience, it shouldn't be hard.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  10. #10
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Question Re: How to create a csv file , excel file?

    Hi George,

    I have trip to get my head around this - no luck.

    Would you mind helping here.

  11. #11
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: How to create a csv file , excel file?

    How can I help Rob ?

    As I mentioned, you need to use on of the ready made classes (or cretae your own code). By clicking on the buttons (CSV or Excel) you should be calling the class or code you have actually used, passing the necesaary parameters so that the class will output to the browser the .csv or .xls file retrieving the file content from the database.

    If this is a csv file that you are taking the data from, and not a database table, it is enough that you add a direct link to the csv file. But, are you sure that it is a good idea to publically display / allo download of member's private data like email address and telephone ??
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  12. #12
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Default Re: How to create a csv file , excel file?

    Hi George,

    Thanks for the prompt reply.

    Displaying the information publicly is a concern and I would like to create a login page that the administrator can access before veiwing this page as you see.

    That same administrator would then be able to press the button to download the data to a csv / excel file.

    All the information is to be taken from the database.

    With regards all th eother information like classes and their correct assigment leaves me lost - sorry

  13. #13
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: How to create a csv file , excel file?

    Rob, we are right where we started from.

    To retrieve and export the database data in CSV or Excel format, you NEED some specific code of your own, or one of the ready made classes PLUS some code.

    Unless you can either right your own code or use one of these classes, I don't see how you can acheive what you are after.

    If it is only for the Admin's use, why don't you simply use phpMyAdmin to export the data as CSV or .xls file ?
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  14. #14
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Default Re: How to create a csv file , excel file?

    Hi George,

    The person who would be the administrator does not have access to my phpadmin and I would prefer to keep it like that hence me looking for the option of them having a login to access this page and then use either option of csv or xls.

    What I need is some one to help me with the classes and code. I do not know enough php to do this on my own.

    I have read up on the net about classes but still remain clueless to how and where they are incorported. I have found examples and treid same but to no success.

    I hope this presents my postion a little more clearly for anyone who may assist

  15. #15
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: How to create a csv file , excel file?

    I will send you some code that you will be able to use for this purpose, to export as csv . Pls allow a couple of days as I am out of town.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  16. #16
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Default Re: How to create a csv file , excel file?

    Hi George,

    Again yolur support is appreciated.

    I will look forward to the next correspondance

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49