Results 1 to 11 of 11

Thread: [RESOLVED] Do i need licences if my VB application use excel and access docs?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2012
    Posts
    25

    Resolved [RESOLVED] Do i need licences if my VB application use excel and access docs?

    Hi,

    I need to know if my VB application create and edits office documents like excel and access database does each user using my application needs to have appropriate Office licenses?

    thanks

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Do i need licences if my VB application use excel and access docs?

    Welcome to VBForums

    Based on the limited information you have given us so far, the only valid answer is "maybe", because it depends on how your program does it.
    • If your program does all of the work entirely by itself (which I seriously doubt, as it is a huge amount of effort), then you don't need licences.
    • If your program interacts with Excel/Access to do the work, your users will need a license for them (and need them to be installed).
    • There are a variety of other methods you could be using, some of which don't need a licence - but also tend to have limited functionality.
    If you give us some details (preferably with a short sample of the code if apt), we can give more accurate advice.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2012
    Posts
    25

    Re: Do i need licences if my VB application use excel and access docs?

    Actually the application is not still created. So i can't show code.

    The main goal of the application is to read a excel file and write some of the data into a access database.

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Do i need licences if my VB application use excel and access docs?

    Writing data to an Access database is easy using standard database technology (such as ADO or ADO.Net), and that does not require a licence. For more information, see our Database Development FAQs/Tutorials (at the top of the Database Development forum)

    It is worth noting however that depending on the circumstances, an Access database might not be ideal, and it may be better to use one of the many free database systems (such as SQL Server Express). There is an FAQ article which discusses the pros and cons.


    Reading from an Excel file depends on how the file is laid out.

    If it is just rows of data (with the top row being headers, or no headers), you can read it using standard database technology... but there are various problems with that (mainly based around data types, due to it not being a database), and you might not be able to solve them. As with the Access method, this does not require a licence.

    If you want to read from particular cells (or get the value of formulas, or check the formatting, etc), I'm fairly sure that you will need to use Excel - or buy some pre-written library from somewhere (which will avoid licence costs for your users, but will be costly for you).

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Feb 2012
    Posts
    25

    Re: Do i need licences if my VB application use excel and access docs?

    Hi Si_the_geek, thanks for your answers.

    Actually the excel file merely contains rows of data... except for the 10-12 first lines containing a header.

    I am surprised you seem to say it is hard to manipulate office documents using VB... im relatively new to VB but since it is Microsoft product i though it would be fairly easy to open/edit Office docs with VB as they are part of Microsoft family.

    Do you have links to some tutorials on editing Office docs with Visual Basic to give me an idea of the level of difficulty?
    Last edited by Paco75; Feb 23rd, 2012 at 08:39 AM.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Feb 2012
    Posts
    25

    Re: Do i need licences if my VB application use excel and access docs?

    Quote Originally Posted by si_the_geek View Post
    If it is just rows of data (with the top row being headers, or no headers), you can read it using standard database technology...
    Can you show me an example how to do this?

    Quote Originally Posted by si_the_geek View Post
    If you want to read from particular cells (or get the value of formulas, or check the formatting, etc), I'm fairly sure that you will need to use Excel - or buy some pre-written library from somewhere (which will avoid licence costs for your users, but will be costly for you).
    Have you tried any of these library? Any recommendations?

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Feb 2012
    Posts
    25

    Re: Do i need licences if my VB application use excel and access docs?

    i think i found some interesting links showing how to connect to Excel using ADO.

    http://www.vbforums.com/showthread.php?t=402060
    http://www.xtremevbtalk.com/showthread.php?t=217783

    This does not need Excel to be installed. And it could be connected to MS-SQL or MySQL!

  8. #8
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Do i need licences if my VB application use excel and access docs?

    Quote Originally Posted by Paco75 View Post
    I am surprised you seem to say it is hard to manipulate office documents using VB... im relatively new to VB but since it is Microsoft product i though it would be fairly easy to open/edit Office docs with VB as they are part of Microsoft family.
    It is quite easy - if you use Excel to do the work (see my Excel automation tutorial via the link in my signature).

    What isn't so easy (or safe) is using it as a "database", via ADO etc. The links you found for it seems to cover everything I would (in terms of examples and explanations), so there isn't much point in me re-writing the same things.
    Have you tried any of these library? Any recommendations?
    I haven't, because I've always had the luxury of knowing that my users will have Excel installed.

    One thing I notice however is that you haven't mentioned which version/edition of VB you will be using, and if you are using VB.Net (VB 2002 and later) there may be a 'built-in' option, using Interop (the FAQs at the top of this forum should give good info about it).

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Feb 2012
    Posts
    25

    Re: Do i need licences if my VB application use excel and access docs?

    I will use latest VB version because i need to buy it. I will use Visual Studio 2010 professional. I guess i might also look if this latest version has built-in tool to ease.

  10. #10
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Do i need licences if my VB application use excel and access docs?

    I am surprised you seem to say it is hard to manipulate office documents using VB
    this depends what you want to achieve and the method you use to do it

    it is easier to automate excel than use ADO, unless your requirements are very basic
    it the excel files are being used on the system already, one would assume that excel must already be installed, unless they are just using a viewer

    if the user already has excel installed you do not need any additional license to automate excel, using any vb version
    same applies for access, but is less relevant, as most all access features can be worked with using ADO of some flavour

    I will use latest VB version because i need to buy it.
    you can download and use VS express edition for free, this may be adequate for you puposes
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  11. #11
    Fanatic Member dmaruca's Avatar
    Join Date
    May 2006
    Location
    Jacksonville, FL
    Posts
    577

    Re: Do i need licences if my VB application use excel and access docs?

    If you're going to use .net maybe you could look into doing openxml development... Automating Excel outside of VBA isn't as pleasant of an experience.

    http://msdn.microsoft.com/en-us/office/bb265236

Posting Permissions

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



Click Here to Expand Forum to Full Width