Click here to Skip to main content
15,915,702 members
Home / Discussions / C#
   

C#

 
GeneralRe: Request for DB selection Pin
Mazdak22-Mar-04 23:59
Mazdak22-Mar-04 23:59 
GeneralRe: Request for DB selection Pin
Heath Stewart23-Mar-04 3:51
protectorHeath Stewart23-Mar-04 3:51 
GeneralRe: Request for DB selection Pin
Heath Stewart23-Mar-04 3:56
protectorHeath Stewart23-Mar-04 3:56 
Generaldelete temp files Pin
hazzem elrefai22-Mar-04 21:12
hazzem elrefai22-Mar-04 21:12 
GeneralRe: delete temp files Pin
Corinna John22-Mar-04 23:47
Corinna John22-Mar-04 23:47 
GeneralRe: delete temp files Pin
hazzem elrefai23-Mar-04 0:25
hazzem elrefai23-Mar-04 0:25 
GeneralRe: delete temp files Pin
Dave Kreskowiak23-Mar-04 1:50
mveDave Kreskowiak23-Mar-04 1:50 
GeneralRe: delete temp files Pin
Heath Stewart23-Mar-04 3:57
protectorHeath Stewart23-Mar-04 3:57 
GeneralRe: delete temp files Pin
Dave Kreskowiak23-Mar-04 4:29
mveDave Kreskowiak23-Mar-04 4:29 
GeneralRe: delete temp files Pin
Heath Stewart23-Mar-04 4:50
protectorHeath Stewart23-Mar-04 4:50 
GeneralRe: delete temp files Pin
Dave Kreskowiak23-Mar-04 5:20
mveDave Kreskowiak23-Mar-04 5:20 
GeneralRe: delete temp files Pin
Heath Stewart23-Mar-04 5:22
protectorHeath Stewart23-Mar-04 5:22 
GeneralRe: delete temp files Pin
Dave Kreskowiak23-Mar-04 5:29
mveDave Kreskowiak23-Mar-04 5:29 
GeneralC# Excel Sheet Reading Problems Pin
MeMyselfAndDotNet22-Mar-04 20:42
MeMyselfAndDotNet22-Mar-04 20:42 
GeneralRe: C# Excel Sheet Reading Problems Pin
Heath Stewart23-Mar-04 4:04
protectorHeath Stewart23-Mar-04 4:04 
You'll have to use the Microsoft Office PIAs (Primary Interop Assemblies). If you are using Office 2002 (XP), you can download them from http://www.microsoft.com/downloads/details.aspx?FamilyId=C41BD61E-3060-4F71-A6B4-01FEBA508E52&displaylang=en[^]. If you're using Office 2003 Professional or Developer you can get these from the CD. They are not downloadable unless you're an MSDN Subscriber, though. In that case, however, you can actually use the XP PIAs because the supported interfaces are backwards compatible, at least for the functionality you need.

In your code, create a new instance of the ApplicationClass and use ApplicationClass.Workbooks.Open to open your file. You can then enumerate the Sheets property to get the name. Make sure to close the workbook and call ApplicationClass.Quit when done. If you design an effective caching system, you could save yourself a big performance hit by remembering which files have which worksheets if you know they won't change.

 

Microsoft MVP, Visual C#
My Articles
GeneralGetting the exe path Pin
SatyaDY22-Mar-04 20:08
SatyaDY22-Mar-04 20:08 
GeneralRe: Getting the exe path Pin
partyganger22-Mar-04 20:24
partyganger22-Mar-04 20:24 
GeneralRe: Getting the exe path Pin
SatyaDY22-Mar-04 21:03
SatyaDY22-Mar-04 21:03 
GeneralRe: Getting the exe path Pin
hazzem elrefai22-Mar-04 21:09
hazzem elrefai22-Mar-04 21:09 
GeneralRe: Getting the exe path Pin
SatyaDY22-Mar-04 21:41
SatyaDY22-Mar-04 21:41 
GeneralRe: Getting the exe path Pin
Dave Kreskowiak23-Mar-04 1:58
mveDave Kreskowiak23-Mar-04 1:58 
GeneralRe: Getting the exe path Pin
Heath Stewart23-Mar-04 4:15
protectorHeath Stewart23-Mar-04 4:15 
GeneralRe: Getting the exe path Pin
Sascha Andres25-Mar-04 11:02
Sascha Andres25-Mar-04 11:02 
GeneralUser control automatically resized when the parent form is sized in C# Pin
jayakarthikeyan22-Mar-04 18:42
jayakarthikeyan22-Mar-04 18:42 
GeneralRe: User control automatically resized when the parent form is sized in C# Pin
Dave Kreskowiak23-Mar-04 1:59
mveDave Kreskowiak23-Mar-04 1:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.