Help with formatting an excel spreadsheet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lushh
    New Member
    • Jul 2006
    • 15

    Help with formatting an excel spreadsheet

    hi guys. i am currently using ms access 2003. i want to export my reports to an excel file so i did a code like this:

    Private Sub cmdActiveListBy EmployeeID_Clic k()

    On Error GoTo Err_cmdActiveLi stByEmployeeID_ Click

    DoCmd.OutputTo acOutputReport, "AlphaListi ng", acFormatXLS, , True

    Exit_cmdActiveL istByEmployeeID _Click:
    Exit Sub

    Err_cmdActiveLi stByEmployeeID_ Click:
    MsgBox Err.Description
    Resume Exit_cmdActiveL istByEmployeeID _Click
    End Sub

    the problem is that when the reports are being exported, data such as dates are not displayed properly on excel. the dates are converted into texts. fonts do also vary. how can i be able to format the excel spreadsheet so that the reports will be shown properly?

    thanks in advance...
  • JohnFitz
    New Member
    • Sep 2006
    • 3

    #2
    Did you try to run the report from a query and then in datasheet view and then "Tools/Analyze in Excel?

    Comment

    • lushh
      New Member
      • Jul 2006
      • 15

      #3
      hi, thanks for the reply. yup, but will that option be available when i make an MDE file of that database? and as much as possible, i want to make the database formal and user-friendly since i won't be the end-user of this database.and i think it would be better to create buttons for report generations... =)

      Comment

      • PEB
        Recognized Expert Top Contributor
        • Aug 2006
        • 1418

        #4
        Hi,

        Have you tried to format your date in your query?

        Maybe it's better to use Cvdate([Your Date]) in your query!

        And I suppose that your date will appear as date in Excel conforming your Regionnal Settings...

        If this don't work there is others ways to resolve the problem...


        Best regards..

        Comment

        Working...