Results 1 to 9 of 9

Thread: Need an application to write to excel

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2009
    Posts
    3

    Need an application to write to excel

    hi all im new here and i just got a new job and their going to need me to maintain a database. i wanted to create a program in VB to make this task easier. i know my way around VB a little and i would just have to research writing and reading to an excel file. what finally needs to be done is i need to be able to add/remove contacts and their addresses phone numbers etc... i also need to be able to EDIT existing information if the need be. finally i need to be able to PULL (X) amount of contacts from that sheet to a different "temp" sheet so i can email this "temp" sheet to someone else. i also would need the program to somehow check the new contacts and arrange it A-Z.

    so my question is....is there a program out there that can do this already? or somethign similar.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Need an application to write to excel

    It sounds like you are using Excel as your database. You can do this, but you'll work harder to make it work. Why not use an actual database?
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2009
    Posts
    3

    Re: Need an application to write to excel

    well, i am going to be working with a company that's going to send out emails periodically to certain people in the database. i know they will take an excel list for the names addresses etc...what other database application would you recommend.

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Need an application to write to excel

    Outputting the data in Excel is probably fine, though I find Excel can be a bit of a pain to work with. For searching, sorting, updating, and managing, I would prefer pretty much anything else, from Access to SQL Server (or SQL Server Express if you want a free solution).

    I put a couple classes in the VB.NET codebank that I use for exporting datareaders and datatables to an Excel spreadsheet. Those might be of some value as they are, and they should certainly be of some value when looking at working with Excel using late binding (so that you don't care which version of Excel the end user has).
    My usual boring signature: Nothing

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Need an application to write to excel

    Welcome to the Forums.

    When you say "VB" are you meaning VB.NET or VB6?
    This is going to be something custom so we can help guide you in writting it but we need to know which language and development environment you will be using for this.

    I have some faqs and tips in my Office Dev thread (link in my signature) that may also be of some help.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Need an application to write to excel

    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  7. #7

    Thread Starter
    New Member
    Join Date
    Oct 2009
    Posts
    3

    Re: Need an application to write to excel

    Quote Originally Posted by Shaggy Hiker View Post
    Outputting the data in Excel is probably fine, though I find Excel can be a bit of a pain to work with. For searching, sorting, updating, and managing, I would prefer pretty much anything else, from Access to SQL Server (or SQL Server Express if you want a free solution).

    I put a couple classes in the VB.NET codebank that I use for exporting datareaders and datatables to an Excel spreadsheet. Those might be of some value as they are, and they should certainly be of some value when looking at working with Excel using late binding (so that you don't care which version of Excel the end user has).
    The great thing about the coding is i can code it to only work with my excel because i will pretty much be the only one using this program/excel file. The higher ups will be giving me lists of names to add/remove/change so multi user compatibility is not an issue.

    i will be using VB.NET

    i havent had a chance to go over all the links and whatnot in this thread but thanks for everyones help so far =)

  8. #8
    New Member
    Join Date
    Oct 2009
    Posts
    11

    Re: Need an application to write to excel

    Personally, for this I would use Access as the database. Then, using VBA, write to Excel or create a query and use Access' built-in tools to export the query to Excel. Or simply copy and paste the query into an Excel template.

    The good thing I've found with Access is that it seems to be nice and powerful. You can also code in it using VBA (a cut-down VB6 I understand). I've written and tested a few ways to read/write CSVs (Comma Seperated Values) that are understood by Excel but, as I say, I think Access has its own ways of writing to Excel at least.

    If the company's databases are in Access you'll probably find you've got everything you need in there.

  9. #9
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Need an application to write to excel

    Quote Originally Posted by djmcbell View Post
    Personally, for this I would use Access as the database. Then, using VBA, write to Excel or create a query and use Access' built-in tools to export the query to Excel. Or simply copy and paste the query into an Excel template.

    The good thing I've found with Access is that it seems to be nice and powerful. You can also code in it using VBA (a cut-down VB6 I understand). I've written and tested a few ways to read/write CSVs (Comma Seperated Values) that are understood by Excel but, as I say, I think Access has its own ways of writing to Excel at least.

    If the company's databases are in Access you'll probably find you've got everything you need in there.
    The links I posted describe how to execute SQL statements directly against an Excel worksheet, no need for a middle-man.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

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