locked
VBA and Excel Automation RRS feed

  • Question

  • Hi Ladies and Gentlemen,

    I need again your help.

    I am developing MS Access application which will be compiled in accde and installed on the customer computer together with MS Access database engine and MS Access runtime. within the application there is a Excel automation to create and excel workbook. The code to do that is as follow:

    -------------------------------------------------------------------

    ' Initiating Excel Objects

    Dim xApp As Excel.Application
    Set xApp = CreateObject("excel.Application")
    xApp.Visible = False
    xApp.DisplayAlerts = False

    --------------------------------------------------------------------------

    Everything is working fine on my computer where MS Office professional 2013 is fully installed.

    However my application will be sometimes for customers who don't have MS office installed on there computer.

    I have installed Accees DB engine and Access runtime and the application works but failed to execute the code above for the Excel automation.

    My question is this:

    What Excel components (a runtime? DB engine? Drivers?) are needed for my the application?

    I hope I state clearly the problem and your help are welcome.

    Thanks.

    Monday, January 29, 2018 11:38 PM

Answers

All replies

  • Hello Ekoue,

    As far as I know, Microsoft does not provide such Excel components which supports operations on Excel file in VBA with installing excel. I think you have to install Excel for your application.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 30, 2018 8:55 AM
  • Hi Terry,

    Thank you very much for your inputs. I will stick to that until someone say something else.

    This is one option to include Excel as prerequisite for my application to run as long as I keep MS Access VBA as programming language.

    I am thinking of an alternative where I will develop my interface in Visual Studio (language is Visual basic). In this case do I still need a full package of MS Excel? or does dot net framework or other visual studio components can take care of creating and manipulation Excel workbook without Excel ?

    Best regards

    Ekoue

    Tuesday, January 30, 2018 1:27 PM
  • Hello Ekoue,

    You could try to use Open XML SDK to create/edit a workbook without Excel in VB .net project.

    Please try to refer to below links for starting.

    Welcome to the Open XML SDK 2.5 for Office

    How to: Create a spreadsheet document by providing a file name (Open XML SDK)

    By the way, what's the statue of below thread? If it has been resolved, I would suggest you mark helpful reply to close the thread. If not, please follow up to let us know your current issue.

    Difference between the Access database Engine and the Access Runtime 

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.




    • Edited by Terry Xu - MSFT Wednesday, January 31, 2018 7:01 AM
    • Marked as answer by Ekoue Thursday, February 1, 2018 6:58 AM
    Wednesday, January 31, 2018 6:58 AM