Editing an Excel Worksheet with vb.net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chris.bunch@gmail.com

    Editing an Excel Worksheet with vb.net

    I have written code to open an excel workbook and edit 2 worksheets.
    The code works great opening and editing a general workbook, but,
    though it opens it fine, it will not edit the worsheets in the specific
    workbook I need to edit. Though it has this problem it never throws
    any kind of exception, just completes like it worked fine.

    The only difference with the workbook I need to edit is that it
    contains macros. When I open the file, I get the "Enable Macros?"
    dialog box. I am thinking that this dialog box is in the way when my
    ap tries to edit the worksheets.

    I have no idea how to get past this and I am at my wit's end. Any
    ideas?

  • Homer J Simpson

    #2
    Re: Editing an Excel Worksheet with vb.net


    <chris.bunch@gm ail.com> wrote in message
    news:1145041552 .068734.77960@u 72g2000cwu.goog legroups.com...
    [color=blue]
    > I have written code to open an excel workbook and edit 2 worksheets.
    > The code works great opening and editing a general workbook, but,
    > though it opens it fine, it will not edit the worsheets in the specific
    > workbook I need to edit. Though it has this problem it never throws
    > any kind of exception, just completes like it worked fine.
    >
    > The only difference with the workbook I need to edit is that it
    > contains macros. When I open the file, I get the "Enable Macros?"
    > dialog box. I am thinking that this dialog box is in the way when my
    > ap tries to edit the worksheets.
    >
    > I have no idea how to get past this and I am at my wit's end. Any
    > ideas?[/color]

    Turn off Excel security Tools:Macros:Se curity:Low



    Comment

    • chris.bunch@gmail.com

      #3
      Re: Editing an Excel Worksheet with vb.net

      Turns out the problem was not the macro window. The real problem is
      kinda embarassing. I was trying to add the data to an Excel file that
      had been created by a consultant. He had hidden the first 20
      worksheets in the workbook. I used the name insted of the index for
      the worksheet, and it works fine now. Thanks for you help though.

      Comment

      Working...