Click here to Skip to main content
15,913,773 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How do I select column from datagrid? Pin
wilssmith5-Jul-06 22:32
wilssmith5-Jul-06 22:32 
GeneralRe: How do I select column from datagrid? Pin
blurMember5-Jul-06 22:40
blurMember5-Jul-06 22:40 
GeneralRe: How do I select column from datagrid? Pin
_AK_5-Jul-06 22:44
_AK_5-Jul-06 22:44 
GeneralRe: How do I select column from datagrid? Pin
blurMember5-Jul-06 23:08
blurMember5-Jul-06 23:08 
GeneralRe: How do I select column from datagrid? Pin
Vipin Venugopal5-Jul-06 22:39
Vipin Venugopal5-Jul-06 22:39 
GeneralRe: How do I select column from datagrid? Pin
blurMember5-Jul-06 22:48
blurMember5-Jul-06 22:48 
GeneralRe: How do I select column from datagrid? Pin
Vipin Venugopal5-Jul-06 23:59
Vipin Venugopal5-Jul-06 23:59 
QuestionQueryInterface for interface Microsoft.Office.Interop.Excel._Application failed Pin
kavithapuranik5-Jul-06 20:39
kavithapuranik5-Jul-06 20:39 
Hi,

im developing a web application using vb.net,where in im creating an excel sheet ,fillin the cells and saving it,
im using windows 2000,and i have installed office 2003.
in my application i have added reference to Excel and microsoft.office.core

in the code ,im using
Imports Excel = Microsoft.Office.Interop.Excel

and in page load ,i have wriiten
Dim excelobj As New Excel.Application
    Dim xlBook As Excel.Workbook
    Dim xlsheet As Excel.Worksheet
    Dim i As Int32

  Dim xlApp As Excel.Application
        Dim xlBook As Excel.Workbook
        Dim xlSheet As Excel.Worksheet
        xlApp = CreateObject("Excel.Application")
        xlBook = CType(xlApp.Workbooks.Add, Excel.Workbook)
        xlSheet = CType(xlBook.Worksheets(1), Excel.Worksheet)

        xlSheet.Cells(2, 2) = "This is column B row 2"
        xlSheet.Application.Visible = True
        xlSheet.SaveAs("C:\Test.xls")
        xlApp.Quit()
        xlApp = Nothing

im not getting any error when i compile ,but during execution,i get
"QueryInterface for interface Microsoft.Office.Interop.Excel._Application failed."


Exception Details: System.InvalidCastException: QueryInterface for interface Microsoft.Office.Interop.Excel._Application

failed.

Execption occurs here
xlBook = CType(xlApp.Workbooks.Add, Excel.Workbook)


pls help to solve this error

thanks

kavitha

-- modified at 2:57 Thursday 6th July, 2006
AnswerRe: QueryInterface for interface Microsoft.Office.Interop.Excel._Application failed Pin
RichardGrimmer6-Jul-06 1:25
RichardGrimmer6-Jul-06 1:25 
Questionprocesses running in remote system Pin
mehnazash5-Jul-06 20:35
mehnazash5-Jul-06 20:35 
QuestionHow can i get the list of Email clients installed on my computer Pin
sharma sanjeev5-Jul-06 20:32
sharma sanjeev5-Jul-06 20:32 
QuestionGenerating HTML FROM XML File Pin
King Shez5-Jul-06 20:25
King Shez5-Jul-06 20:25 
AnswerRe: Generating HTML FROM XML File Pin
King Shez5-Jul-06 22:06
King Shez5-Jul-06 22:06 
GeneralRe: Generating HTML FROM XML File [modified] Pin
DIMPLE_R5-Jul-06 22:48
DIMPLE_R5-Jul-06 22:48 
GeneralRe: Generating HTML FROM XML File Pin
King Shez6-Jul-06 5:20
King Shez6-Jul-06 5:20 
Questionsharepoint for win xp Pin
mehnazash5-Jul-06 20:04
mehnazash5-Jul-06 20:04 
AnswerRe: sharepoint for win xp Pin
minhpc_bk5-Jul-06 20:51
minhpc_bk5-Jul-06 20:51 
QuestionRecieve Mails in Asp.Net Pin
venkatasivaramaprasad5-Jul-06 19:26
venkatasivaramaprasad5-Jul-06 19:26 
AnswerRe: Recieve Mails in Asp.Net Pin
Socheat.Net5-Jul-06 22:03
Socheat.Net5-Jul-06 22:03 
GeneralRe: Recieve Mails in Asp.Net Pin
venkatasivaramaprasad6-Jul-06 23:18
venkatasivaramaprasad6-Jul-06 23:18 
GeneralRe: Recieve Mails in Asp.Net Pin
Socheat.Net6-Jul-06 23:30
Socheat.Net6-Jul-06 23:30 
QuestionInterfaces in the vb.net 1.1 Pin
amaneet5-Jul-06 18:41
amaneet5-Jul-06 18:41 
Questionneed urgent help Pin
nauty5-Jul-06 18:27
nauty5-Jul-06 18:27 
AnswerRe: need urgent help Pin
Vasudevan Deepak Kumar5-Jul-06 18:58
Vasudevan Deepak Kumar5-Jul-06 18:58 
AnswerRe: need urgent help Pin
Muhammad Chitrali5-Jul-06 21:03
Muhammad Chitrali5-Jul-06 21:03 

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.