can i use the Express Edition to control msWord or msExcel?

hi

if i use the Express edition version can i call the Word application and then edit the content or update the bookmark

i know the Visual Studio Tools For Office can handle this. Right

please reply. THANK YOU




Answer this question

can i use the Express Edition to control msWord or msExcel?

  • ppl1

    Sorry, it is C# code. I write C# all day, so it is the easiest to write it out of my head without starting a new IDE instance.

    But everything works fine now


  • Deven Kampenhout

    i try it already in the trail express edition, but it is not success.

    when i using the vb6.0, i can use

    Dim wddapp As Excel.Application
    Dim wddoc As Excel.Workbook
    Dim wd As Excel.Worksheet

    wddapp = CreateObject("Excel.Application")
    wddapp.Visible = True
    wddoc = wddapp.Workbooks.Add

    wd = wddoc.Worksheets(1)

    wd.Cells(0,1)="hihi"

    # but now ! when i try wd.Cells() , it is read only, cannot add the col no. and row no.

    please help to solve



  • Ya_aa

    You can use the same API as you use in VB6. You can use COM stuff in .NET, here is a little example on MSDN: click me!



  • Edward JJJJ

    Sorry,

    under your teach, i success to input the value to the excel , THank you.

    wddapp = CreateObject("Excel.Application")

    wddoc = wddapp.Workbooks.Add
    wd = wddoc.Worksheets(1)
    wddapp.Visible = True

    'Get a new workbook.
    wddoc = wddapp.Workbooks.Add

    wd = wddoc.ActiveSheet

    '//Add table headers going cell by cell.
    wd.Cells(1, 1) = "First Name"
    wd.Cells(1, 2) = "Last Name"
    wd.Cells(1, 3) = "Full Name"
    wd.Cells(1, 4) = "Salary"

    Thank you.



  • Rahul Virli

    It shoud look like this:


    //Start Excel and get Application object.
    Excel.Application oXL = new Excel.Application();
    oXL.Visible = true;

    //Get a new workbook.
    Excel._Workbook oWB = (Excel._Workbook)(oXL.Workbooks.Add( Missing.Value ));
    Excel._Worksheet oSheet = (Excel._Worksheet)oWB.ActiveSheet;

    //Add table headers going cell by cell.
    oSheet.Cells[1, 1] = "First Name";
    oSheet.Cells[1, 2] = "Last Name";
    oSheet.Cells[1, 3] = "Full Name";
    oSheet.Cells[1, 4] = "Salary";




  • Jon Shute

    Yes you can. For editing Office documents you can just use soms API's. This doesn't depend on you IDE.

    But when you have the Vusual Studio Tools for Office edition or the Team System you have some nice intergrated templates and futures. This makes live easier but is not needed to develop application that work with Office documents.

    The product line overview can be foud here:
    http://msdn.microsoft.com/vstudio/products/compare/



  • Mattxxxxxx

    the coding have the big difference.

    is it vb script

    The vb code like this:

    Dim wddapp As Excel.Application
    Dim wddoc As Excel.Workbook
    Dim wd As Excel.Worksheet

    wddapp = CreateObject("Excel.Application")

    wddoc = wddapp.Workbooks.Add
    wd = wddoc.Worksheets(1)
    wddapp.Visible = True

    wd.Cells(0, 0) = "hihi" <--- error in here



  • Java Programmer

    thank you so much

  • Andrew SES

    Thank you.

    But i am not success. can you give me the example how to add the value to excel file.



  • can i use the Express Edition to control msWord or msExcel?