opening excel file with vb.net?

Hi,

I'm trying to open an excel file using vb.net. I've found a way on the web but I'm getting this error:

<script runat="server">
Sub LinkButton_Click(sender As Object, e As EventArgs)
Dim xlApp As Excel.Application
Dim xlWB1 As Excel.Workbook
Set xlApp = New Excel.Application
xlApp.Visible = True
Set xlWB1 = xlApp.Workbooks.Open("test.xls")
xlWB1.Close
Set xlWB1 = Nothing
xlApp.Quit
Set xlApp = Nothing
End Sub
</script>


Error: Excel.Application not defined.
Which .net class handles the excel object?
thanks
Lori
0
skyesweb
1/31/2005 7:34:57 PM
asp.net.integration 1945 articles. 0 followers. Follow

1 Replies
674 Views

Similar Articles

[PageSpeed] 5

I use Microsoft.Office.Interop.Excel to handle the excel files, the operation is similar to yours

Estelle
Estelle
0
estelle2828
2/2/2005 5:21:05 PM
Reply:

Similar Artilces:

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

converting vb.net 2003 files to vb.net 2005
Hi, i am beginner..i watch videos about vb.net..they made on vs.net 2003 when i wrote these codes in 2005 ,it gives errors..is there any program which convert the code automatically?   thanks,Thanks,Speranza What videos are you talking about?  There are lots of great, up-to-date ASP.NET Videos on this site for free.Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you! i am talking about learnvisualstudio.net videos..Thanks,Speranza Speranza:they made on vs.net 2003 when i wrote these codes in 2005 ,it gives errors..is there a...

Open a excel file show it for 10 sec and then close it by using vb.net
Hello FrinedsI in a problem...The client required to open a number of excel files from a folder, show it for twenty secounds and then close it.It should happen it the cyclic manner.The page should also scroll... You can say i want to make a slide show of the excel sheet...Any kind of help would be great ThanksAmit ...

in vb.net how to open a file from file download prompt without asking user to save it or run it....just open it in internet explorer
I am designing a VB.NET based website I have a hyperlink, upon clicking on it a "File Download" prompt opens which asks me whether I want to "Save" the file, "Open"   But I want it to directly open in Internet Explorer without showing the prompt.... How can i do this? It should not show any prompt... when i click on the hyperlink....it should directly open in a new IE window.... Thanks....   Try this  Response.AddHeader("Content-Disposition", "inline; filename=Log_" & activityLogID & ".xml") th...

Integrating the C#.net and VB.net application
Hello All,  I'm trying to integrate the C#.net application and VB.net application.  Can you give me any suggestions of how to merge them.  Thanks in Advance You are probably goign to have to convert one of the applications to the other language at one point.  There are online conversion tools to help http://www.carlosag.net/Tools/CodeTranslator/- WilliamPlease mark the most helpful reply/replies as "Answer".Give some of my PWSK modules a try.  Type of application?We All move to our original place.Don't forget.Imran Baloch @weighfield: I d...

open the open file dialog box on button click using vb.net
 Using vb.net code,I want to open the open file dialog box on button click  and then to select a file  and  selected file has to be shown in a text box.On clicking another button, file name should get stored in database.Anyone who has solution or suggestion, pls reply. You need to drop a FileUpload control on your page. It does much of the job automatically. Here is the Aap.Net tags:  <div> <asp:fileupload ID="MyFile" runat="server"></asp:fileupload> <br /> <asp:TextBox ID="txtFileName" runat...

converting to vb.net from c#.net authorize.net
authorize.net offered me some sample code when I signed up with them the only problem is the sample code is in c#.net but my page that they type all of their credit card into is vb.net <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage("https://certification.authorize.net/gateway/transact.dll"); } private String readHtmlPage(string url) { ...

How to Print Excel File In VB.Net???
hi, I have a function for creating an excel report: PseudoCode: Loop1        Read through the dabase; Can Have several Records; Each Record is 1 file            Loop2               MyBase.BookOpen("C:\Documents and Settings\sheila\My Documents\Visual Studio 2005\Projects\excel1\Format.xls")               1 file---->can have several pages    ...

How to Create an Excel File from VB.Net
VWD 2008 Express.  Visual Basic. Is it possible to build an Excel workbook from VB code behind an aspx page.  What do I need to do?  Can anyone provide a code sample?  Thanks.Dr. Douglas PruiettGood News Jail & Prison Ministrywww.goodnewsjail.org Not knowing your exact needs, this code sample from ASPNet101.com shows how to export from a Gridview to an Excel file http://www.aspnet101.com/aspnet101/aspnet/codesample.aspx?code=gvExportExcelDavid WierMCP/ASPInsiderASPNet101.com - where to look first!Please Vote for ASPNet101 - 'Best Community Resource'!Contro...

How to Read Excel File AT VB.NET
Hi anyone know how do i read excel file at VB.net & display the result in a label or something.. e.g i know cell A2 is a string of text - e.g Hello this is the P/L for the month  i want grab that and put in a label etc.Thanks , it would be good if can refer me to url on using Microsoft Excel Library Object & its coding to connect, close connection , grab data from cell and input back the data. Regards,Bao  My Anime Site My Quality Animes HR BLOG With the proper connection string (http://www.connectionstrings.com/?carrier=excel) you can query it like ...

How to open Community starter kit in VS.NET for VB.NET?
Hi,   Some one please tell me how to open community starter kit in VS.NET 2003 as there is no solution object or project file in CommunityStarterKit folder. I have read the documents and installation is fine. Some one tell me please   Thanks There are two different formats of the CSK download. One format uses the SDK compilers and is best if you use notepad, webmatrix or similar. The other format is for Visual Studio . Net users.http://www.asp.net/StarterKits/DownloadCommunity.aspx?tabindex=0&tabid=1 Assuming you downloaded the VS.net version and installed it us...

vb.net vs c#.net vs j#.net
just out of curiousity which looks, acts most like java? i'm still learning trying to used to vb.net but it seems that it was easier to do some stuff with java. C# is Java++ in my opinion. If you have done C or Jave you will prefer C#.Mike Schellenberger - MCAD If you are looking for language similar to java go for J#. However most code samples you find on the net will be in VB.NET and C#....

how can i Get OCX File in .net IDE vb.net/C3
hi all,      How can I generate OCX file in VB.net/c# 2005 that will interact in web pages...?Thanks & Regards,Murthy. Hi murthysrn, As far as I know, VB 2005 and C# 2005 cannot create the project for ocx file. However, I hope the following link will be helpful to you. Creating an ActiveX Control in Visual Studio 2005http://msmvps.com/blogs/pauldomag/archive/2006/08/16/107758.aspxSincerely,Benson YuMicrosoft Online Community Support Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other co...

how to read opened files using vb.net
Hi, I have written a backup solution using vb.net and C#.Net. But, I am not able to backup the opened files, which will be skipped. Can anyone please suggest me some idea to read and write opened files using vb.net ? Thanking you Regards Praveen There is an overload to Dile.Open that allows you to specify a aharing mode. However, if you are trying to open a file that another process has opened and not allowed sharing, you will not be able to share the file.Starting with ASP.NET 2.0? Look at:Programming Microsoft Web Forms My Blog...

Web resources about - opening excel file with vb.net? - asp.net.integration

2010 Winter Olympics opening ceremony - Wikipedia, the free encyclopedia
Canadian fiddlers perform during the Opening Ceremony of the XXI Olympic Winter Games, Feb. 12, 2010, at BC Place stadium in Vancouver. The Opening ...

Facebook Testing Opening Of Facebook.com Links By Android App?
Facebook appears to be using the latest beta version of its Android application to quietly test allowing the app to open facebook.com links, ...

Into Film Festival opening Q&A
Today I met Malala. She was giving, utterly graceful, compelling and intelligent. That might sound obvious but I was struck by this even more ...

American College Football season 2016: Sydney host opening fixture - DailyTelegraph Search Search
CHEERLEADERS, marching bands, crazy fans, a giant pack of fearsome Golden Bears and an army of Hawaiian Warriors will take over Sydney in a $10 ...

Countdown to Flagstaff Station opening on weekends
Flagstaff railway station will be open on weekends at some time in the next 32 days.

Porsche opening network of dedicated Classics centers
Filed under: Porsche , Auto Repair , Maintenance , Classics The first dedicated Porsche Classic Center has opened in the Netherlands, paving ...

Spanish band Hinds talk debut LP, the Madrid scene, opening for The Libertines, and more
by Tatiana Tenreyro Madrid garage rock band Hinds' singers/guitarists Carlotta Cosials and Ana García Perrote initially started out as a duo ...

'Creed' is rising at the box office, expected to take $42 million in opening week
... Games: Mockingjay Part 2" and Pixar's "The Good Dinosaur," as Deadline reports . It's rare to see a film's box-office haul rise from its opening ...

Opening Arguments Begin In Trial For Officer Charged In Gray’s Death « CBS Baltimore
A jury is seated, opening statements are complete and the prosecution calls its first witness in the trial for one of six officer’s charged in ...

Matthew Aldrich To Adapt ‘Opening Belle’ Pic For Reese Witherspoon & Warner Bros
EXCLUSIVE: Scribe Matthew Aldrich has been tapped to pen the adaptation of Opening Belle , the potential Reese Witherspoon-starrer at Warner ...

Resources last updated: 12/4/2015 12:04:43 AM