C# Excel multiple cell/column/row SQL Query Question

  • Thread starter Thread starter rise4peace
  • Start date Start date
R

rise4peace

Howdy,

I am trying to select a range of data within an excel spreadsheet using
a SQL query. The two queries below do the trick but I was wondering if
there's any way to combine both of these SQL queries into one query?

SELECT * FROM [Retail @home$A11:H46]
SELECT * FROM [Retail @home$J12:Q46]

It looks to me like trying to do multiple column/row selects in one
statement is not possible but hopefully someody has done it ;)

Any help would be very very appreciated!

cheers,

frank grimes
 
SELECT * FROM [Retail @home$A11:H46] UNION ALL SELECT * FROM [Retail
@home$J12:Q46];
 
I am sorry, I am not able to answer your question,but I have another
question about axSpreedsheet. Could you help me?
How can i access the names which defined in axspreedsheet11.0?
for example:
System.Collections.IEnumerator myEnumerator =
axSpreadsheet1.Names.GetEnumerator();
Console.WriteLine("The Array contains the following values:");
int i = 0;
while ((myEnumerator.MoveNext()) && (myEnumerator.Current !=
null))
Console.WriteLine("[{0}] {1}", i++,
myEnumerator.Current);

but the result can not list the names just display "System._ComObject".
thank you!
 

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

Back
Top