954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Writing to Excel using OleDB - data misplaced

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 theworksheet, 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!

Jinspire
Newbie Poster
7 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

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!

Jinspire
Newbie Poster
7 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: