Urgent... Getting error in accessing named ranges in excel 2007...

H

Himanshu Nigam

Hi,

There are two issues I am facing in my code
Issue 1.
The scenario is
From C# code I am opening excel 2007 workbook as database.
In the workbook there are certain named ranges defined with scope as both
workbook and sheets.
e.g. EventLiveDate (workbook level) valInEvent (sheet level)
When I am trying to query them as
1. select * from EventLiveDate
2. select * from ['Store2DG_1'valInEvent]

I am getting result from first but second gives and exception

"The Microsoft Office Access database engine could not find the object
''Store2DG_1'valInEvent'. Make sure the object exists and that you spell its
name and the path name correctly."

But when i use workbok in excel 2003 this works fine.

Issue 2
Scenario is
Small size excel 2003 workbook is giving no problem but when size of the
workbook is 130 MB, it gives runtime error system resource exceeded.

This is a bit urgent .....
Thanks..
 
J

JLGWhiz

I have never used C# to access Excel before, but guessing that
['Store2DG_1'valInEvent] represents a worksheet and range, then try:

['Store2DG_1'!valInEvent]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top