How to create a csv file , excel file?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Rob (SA)
    Lieutenant Colonel

    • Nov 2006
    • 586

    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
    Kind Regards
    Rob
    www.gnjgf.co.za
    www.oryan-projects.com
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    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!

    Comment

    • Rob (SA)
      Lieutenant Colonel

      • Nov 2006
      • 586

      #3
      Re: How to create a csv file , excel file?

      Hi George,

      Thanks for the advice.

      Where do I find these PHP classes?
      Kind Regards
      Rob
      www.gnjgf.co.za
      www.oryan-projects.com

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #4
        Re: How to create a csv file , excel file?

        Free PHP Classes and Objects 2024 Versions with PHP Example Scripts, PHP Tutorials, Download PHP Scripts, PHP articles, Remote PHP Jobs, Hire PHP Developers, PHP Book Reviews, PHP Language OOP Materials


        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!

        Comment

        • Rob (SA)
          Lieutenant Colonel

          • Nov 2006
          • 586

          #5
          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
          Kind Regards
          Rob
          www.gnjgf.co.za
          www.oryan-projects.com

          Comment

          • Rob (SA)
            Lieutenant Colonel

            • Nov 2006
            • 586

            #6
            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?
            Kind Regards
            Rob
            www.gnjgf.co.za
            www.oryan-projects.com

            Comment

            • navaldesign
              General & Forum Moderator

              • Oct 2005
              • 12080

              #7
              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!

              Comment

              • Rob (SA)
                Lieutenant Colonel

                • Nov 2006
                • 586

                #8
                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
                Kind Regards
                Rob
                www.gnjgf.co.za
                www.oryan-projects.com

                Comment

                • navaldesign
                  General & Forum Moderator

                  • Oct 2005
                  • 12080

                  #9
                  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!

                  Comment

                  • Rob (SA)
                    Lieutenant Colonel

                    • Nov 2006
                    • 586

                    #10
                    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.
                    Kind Regards
                    Rob
                    www.gnjgf.co.za
                    www.oryan-projects.com

                    Comment

                    • navaldesign
                      General & Forum Moderator

                      • Oct 2005
                      • 12080

                      #11
                      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!

                      Comment

                      • Rob (SA)
                        Lieutenant Colonel

                        • Nov 2006
                        • 586

                        #12
                        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
                        Kind Regards
                        Rob
                        www.gnjgf.co.za
                        www.oryan-projects.com

                        Comment

                        • navaldesign
                          General & Forum Moderator

                          • Oct 2005
                          • 12080

                          #13
                          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!

                          Comment

                          • Rob (SA)
                            Lieutenant Colonel

                            • Nov 2006
                            • 586

                            #14
                            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
                            Kind Regards
                            Rob
                            www.gnjgf.co.za
                            www.oryan-projects.com

                            Comment

                            • navaldesign
                              General & Forum Moderator

                              • Oct 2005
                              • 12080

                              #15
                              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!

                              Comment

                              Working...
                              X