Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Populate Excel Spreadsheet Cells

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Populate Excel Spreadsheet Cells

    First, let me apologize if this has been addressed somewhere previously. I have searched throught the forum and can't find anything.

    I have a construction company database of "customers" with the usual name, adderss, etc. The customer database is an Alpha5 database on a virtual web server.

    When a new customer calls in, their information is entered into the database. If they want a project estimate, we send the information to a field representative to meet the customer. They have an extensive Excel spreadsheet they use for estimations and calculations.

    What I want to do is provide a button they can click that will open a new instance of the Excel spreadsheet and populate very specific cells with information already gained on the initial contact (name, address, etc.).

    I know this is possible, but while I am somewhat ok with MS Access and VBA, I am totally lost with XBasic. Does anyone have any routine that can accomplish this?

    Thanks!

    #2
    Re: Populate Excel Spreadsheet Cells

    Hi Lzy,

    My question is, why open a spreadsheet when a form can be used to enter all the same details that would have gone into the spreadsheet?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #3
      Re: Populate Excel Spreadsheet Cells

      The customer is a construction company. I invite you to look at my original post, paragraph 3. They have an extensive spreadsheet they use in the field for estimations. It calculates many things, labor, material, etc. They make their estimate and provide the customer with a copy.

      Yes, it can be done in a database form, but is more expediant with a spreadsheet. They have been using their system for years and are very happy with that part. It should be simple to integrate the spreadsheet into the database rather than design and program forms from scratch to do what they are already doing. How hard can it be to populate an already existing spreadsheet with customer name information and then later extract 3 or 4 cells to insert in database fields, where I may only need man-hours and total cost.

      And....if for no other reason, it is what the customer wants.

      I have often integrated spreadsheet and database operations in Access. I believe both programs have their strengths. Right tool for the job kind-of-thing. I can do this easily with Access using VBA. I'm just having the problem with XBasic.

      Comment


        #4
        Re: Populate Excel Spreadsheet Cells

        Hi Lzy,

        One of my best customers is a construction company, I do know how they work, over here that is.

        I totally agree with you, "Right tool for the job kind-of-thing". Just because the customer has always done it that way does not necessarily make it the best way. I'm sure they are not using the same tools from when they started their business. Many companies I come across have been using spreadsheets for years, as soon as they see the how easy data input is in a database, they wish they had made the move years ago.

        Many companies get into the habit of using a spreadsheet just because it is there and not appreciating all the risks of errors and malicious theft of data. You may think that is what they want, until you show them something better.

        Please let us know what the problem is, that you are having with Xbasic.
        Regards
        Keith Hubert
        Alpha Guild Member
        London.
        KHDB Management Systems
        Skype = keith.hubert


        For your day-to-day Needs, you Need an Alpha Database!

        Comment


          #5
          Re: Populate Excel Spreadsheet Cells

          I think I have most of it figured out. My main sticking point right now is if I open from a grid (detail view) is passing values from the detail grid to excel. I'm sure it has something to do with the variables. I'll keep plugging away until I find it. I'm working my way through local, session, and global variables. I'm sure I'll figure it out, I was just hoping there would be someone out there who has done this already. Wouldn't have to reinvent the wheeel.

          Comment


            #6
            Re: Populate Excel Spreadsheet Cells

            Originally posted by LzyOldFrt View Post
            I think I have most of it figured out. My main sticking point right now is if I open from a grid (detail view) is passing values from the detail grid to excel. I'm sure it has something to do with the variables. I'll keep plugging away until I find it. I'm working my way through local, session, and global variables. I'm sure I'll figure it out, I was just hoping there would be someone out there who has done this already. Wouldn't have to reinvent the wheeel.
            Our company is a contract research organization and as such we are high power users of EXCEL to process, graph scientific laboratory data. In any case, we have been struggling with the same problem. That is how do we export data to excel into specific cells in a specific pattern. Since you have made progress on this issue, could you provide a brief synopsis of your successful approach on this forum. Many thanks to you for solving this problem.

            Dswezey labgeek

            Comment


              #7
              Re: Populate Excel Spreadsheet Cells

              Can someone show me how to extract data from excel (2007) using xbasic (A5) so I can import it into MySQL .. or how to read a simple CVS file .. which can be generated from excel file ?? Thank you in advance my mentors.. 6/7/2015

              Comment


                #8
                Re: Populate Excel Spreadsheet Cells

                Originally posted by son04littleelm View Post
                Can someone show me how to extract data from excel (2007) using xbasic (A5) so I can import it into MySQL .. or how to read a simple CVS file .. which can be generated from excel file ?? Thank you in advance my mentors.. 6/7/2015
                Look at the import operations to get data from excel or csv.

                Then look at append operations to move the data into MySql.
                Al Buchholz
                Bookwood Systems, LTD
                Weekly QReportBuilder Webinars Thursday 1 pm CST

                Occam's Razor - KISS
                Normalize till it hurts - De-normalize till it works.
                Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                When we triage a problem it is much easier to read sample systems than to read a mind.
                "Make it as simple as possible, but not simpler."
                Albert Einstein

                http://www.iadn.com/images/media/iadn_member.png

                Comment


                  #9
                  Re: Populate Excel Spreadsheet Cells

                  I have looked into the import documentation of a5 and it is not the same as the version that I have (v12.3 build 2399). Plus I like to see if there is a programmatical way of reading the excel data using xbasic... because if I can read it then I can write to it as well.. I have been doing this for years but using VB6 not xbasic.. please point me to links or code examples..
                  also, can I get directions on how to read a text file using xbasic??
                  Last edited by son04littleelm; 06-08-2015, 07:48 PM.

                  Comment


                    #10
                    Re: Populate Excel Spreadsheet Cells

                    Maybe look in older threads and you will see tons of excel scripts....
                    http://www.alphasoftware.com/alphafo...ighlight=excel
                    http://www.alphasoftware.com/alphafo...ighlight=excel
                    http://www.alphasoftware.com/alphafo...ighlight=excel

                    Comment


                      #11
                      Re: Populate Excel Spreadsheet Cells

                      I don't mean to dilute the instruction here but the kinds of import/export issues on this thread are a good thing to pass to a consultant. I have done everything noted in this thread including generating complex spreadsheets from complex data, and importing from complex sources. Also have converted super complex Excel "programs" in to streamlined Alpha applications. There are a bunch of ways to import data, and a bunch of ways to produce the right output, and to integrate with Excel and other programs. But it is hard to provide all of the instructions in a forum thread; it requires hands-on.

                      I am just using myself as an example of an "Alpha consultant", there are plenty of other qualified developers on this forum. You can try posting the project at www.iadn.com or ask any of the professionals here on the forum for their expert consulting time. For issues like this it is most often worth the money.
                      Steve Wood
                      See my profile on IADN

                      Comment


                        #12
                        Re: Populate Excel Spreadsheet Cells

                        I am quite aware that if I ask an alpha five consultant that they would have the answer to my question. I am currently un-employee at the time, and really not in the position to spend much money. I am very verse in writing codes in VB6 to interact with excel and generate dynamic reports. I have been doing this type of work over 10 years. But for some reason I can not get my VB6 to work on windows 7. Otherwise I would just do it in VB6 and transfer the data to MySQL programmically. all I am asking is for code examples of how xbasic code for reading and writing from a plain text file. I can have excel save its data into a csv file. Thank you for all your responses. I truly appreciate your time and assistance.

                        Comment


                          #13
                          Re: Populate Excel Spreadsheet Cells

                          Hello Andy!!!! thank you so very much for all these links!!! this is exactly what I needed.. you are so awesome!! thank you!!! thank you !! thank you!!!!

                          Comment


                            #14
                            Re: Populate Excel Spreadsheet Cells

                            Hello, a while back you gave me such helpful information on how to interface with excel. It is very similar to the way I have done it using VB6. I still can not do this one simple thing. Perhaps I am missing something that is causing it to not work, please help or point me to the appropriate link.

                            Here is what I was attempting to do. just write to an excel cell

                            dim glexc as p
                            dim glWs as p


                            glexc = ole.getobject("","Excel.Application")
                            glExc.Workbooks.Open("E:\projects\expenses\2016\WklySum 2016.xlsm")
                            glWs = glExc.ActiveWorkbook.Worksheets("wkData")

                            glWs.cells(3,2).value = 34

                            I can read from a cell but can not write to it??? do you know why??

                            Comment


                              #15
                              Re: Populate Excel Spreadsheet Cells

                              That doesn't look like writing to a cell. It appears you are writing to a block of cells?

                              I use the construction

                              Glexc.range("a1").select()
                              Glexc.activecell.Formula = 34

                              For example.
                              Last edited by Stan Mathews; 01-25-2016, 06:20 PM.
                              There can be only one.

                              Comment

                              Working...
                              X