Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2004
    Posts
    178

    Unanswered: exporting to excel

    is it possable to export textbox on a form to a cell in excel

    eg. text2 to goto totals!e4

    also the letter would change depending on the day e=friday, f=saturday...

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    yes its possible - but it'll be a b!!!ger to set up, ensuring that you handle all posiible eror conditions
    eg file (excel spreadhseet) not found , or locked, or no permissions

    I hate to ask but waht are you trying to do? - there may be a 'better' or 'easier' way to meet your user requirement

  3. #3
    Join Date
    Aug 2004
    Posts
    178
    i ahe done a database to sell tickets for a cinema from one of the reports they fill out an excel workbook which has 10 sheets in it, they only fill in info in two of them. the main one film sheet and shop the other sheets gets all there info from them. the main sheet that everyone looks at is the info sheet which has all the totals in it howmany ticks were sold perday how mush shop perday how mush money the boxoffice made perday and the totals and it has the %s boxoffice spend per head shop spend perhead. what i was hoping that access would be able to fill in the info for me.

  4. #4
    Join Date
    Aug 2004
    Posts
    178
    here is the excell file i am trying to put data in
    Attached Files Attached Files

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Excel export

    On your form, if you have a button which exports to an excel file, I would have this button do a make-table query (or execute the query in code) where you can then capture the text box on the form in the query. In this make-table query, you would have a column which is something like: MyTextField: Forms!MyExportForm!TextBoxfield.

    You can then export the new table created (or you can possibly just export the query).

    You could also put in your logic for:
    "also the letter would change depending on the day e=friday, f=saturday..."
    in the query or code.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  6. #6
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    If you anticipate that the Excel spreadsheet will already be open, the quick and dirty way is to copy the data on the clipboard in tab-delimited format. The user can then paste it straight in.

    If you're able to create a spreadsheet from scratch, don't forget that for recent (and not so recent) versions of Excel (and Word and Powerpoint) you can write out XML and save it in a file named .xls. To figure out the XML, just make up a file that looks like the one you want, save as XML and open it in Notepad to see what it should look like.

Posting Permissions

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