Hello, everyone,

My question deals with Excel, and not Access, but I understand they should be roughly the same.

I have an Excel worksheet which contains several tables.
The tables are actually named ranges; basically, I grabbed an area, gave it a name, and -voila!- it is a table.

Until recently, I was able to insert data using OleDB, using the names of the ranges as the table names:

INSERT INTO tblNamedRange VALUES ('Blah', 'blah', 'blah')

Until recently, it worked.

However, lately it started causing a problem;
The data gets inserted to the worksheet, and not to the specific tables within it.

In other words, instead of filling up data further down on the sheet, where tblNamedRange is located, the information simply appears at the top of the sheet, overwriting other text.

I have no idea what is causing this to happen.

Your sound advice would be greatly appreciated!

UPDATE:

This problem only occurs when the file isn't open by the explorer.

When the file is open, then what happens is this:

  • When debugging, it works perfectly.
  • When published to the IIS, I get a

protected memory error.


I look forward to your help!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.