Results 1 to 4 of 4

Thread: Creating an Excel File

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    45

    Creating an Excel File

    I want to write some data to excel file ... making a speciall format for it ... i have read the following post in the forum after searching for Excel ... but can't get answer to my questions

    Code:
    http://vbforums.com/showthread.php?t=400713&highlight=create+excel
    How can i save my file ??

    whats the usage of worksheet object ??
    If you find my questions or answer useful .. then please do rate me. Thanks

  2. #2
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,713

    Re: Creating an Excel File

    What do you mean a special format?

    Using the Excel Object Model is the easiest way. Just create your objects and issue a .SaveAs method call.
    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

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    45

    Re: Creating an Excel File

    RobDog888
    special format means ... i have to make some rows bold, make some column aligned and colord. leave this part ...

    i have already coded the way you described .. bt i am facing the prblm.

    I used
    Code:
    xlSheet.Save
    xlAp.Save = "C:\1.xls"
    but it is saving the applicatoin on the desire path, however the sheet is being saved in My Documents ... what should i do?
    If you find my questions or answer useful .. then please do rate me. Thanks

  4. #4
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,713

    Re: Creating an Excel File

    The .Save method does not take any arguments. Use the SaveAs in order to specify the location of the file. Also, its a method of the workbook object and not the sheet object.
    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

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