473,394 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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?

Apr 14 '06 #1
2 1673

<ch*********@gmail.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
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?


Turn off Excel security Tools:Macros:Security:Low

Apr 14 '06 #2
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.

Apr 14 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
1
by: c duden | last post by:
Excel won't allow documents to be linked to a worksheet in office 2000 when using C# to create an add-in. The following code snippets are what was used in the attempts (there are more...
1
by: mail2atulmehta | last post by:
Hi, I do not know if this is right place for this, but i need some help. I have a text file, whose values are seprated by a delimiter. I want to open this file in excel, ( not import it) . I have...
0
by: dgoel | last post by:
Hi, I Have a text file & I want to open it in excel sheet ( withou importing). I have written code for it, but it is not opening exce sheet. It opens the text file, but does not create a excel...
1
by: javzxp | last post by:
Hi I'd like to use C# to open an existing Excel workbook and save each worksheet it contains into a new Excel file. The name of each new Excel file should be the name of the worksheet copied...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
8
by: Sam | last post by:
Hi All, I posted this message few days ago. No one has answered so far. I just would like to know if it is possible to do or not. Even if you can not tell me how to do this, maybe you know which...
1
by: Randall Arnold | last post by:
I'm converting a vbscript program to vb.net. Witht he exception of .net idiosyncrasies, most of it is working well with the same code. My only problem is that some properties and methods are...
6
by: gumbystation | last post by:
I am looking to take data from an excel spreadsheet into a csharp application to manipulate the data in various ways. Currently, I am using VS2005 (self-taught C#) and Excel 2000. I have...
6
by: =?Utf-8?B?RGF2aWQ=?= | last post by:
Hello, How can I disable that message/question that appears when my program edits an Excel file? Here's the code: Excel.Application excelApp = new Excel.ApplicationClass(); Excel.Workbook...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.