?
Solved

open excel document in web form using vb.net

Posted on 2013-01-08
4
Medium Priority
?
628 Views
Last Modified: 2013-01-08
Having issues trying to open an excel document on a web form. The excel document is loading via a datatable. This works perfect on my dev pc running the vs2008 web application, but when I try to publish to the web, it gives me an error trying to save the document because it is in use by another program. I've tried using ClosedXML to do this along with the excel interop. Both are having issues because I'm trying to save the document to the server before opening the document. Is there any way to just open a excel document and fill it from a dataset or datatable with out having to save the document first before opening it in vb.net web form?
0
Comment
Question by:jeremyzit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 38755042
>before opening it in vb.net web form?

Are you sending this document to client?

http://www.aspsnippets.com/Articles/Export-DataSet-or-DataTable-to-Word-Excel-PDF-and-CSV-Formats.aspx
0
 

Author Comment

by:jeremyzit
ID: 38755390
Tried above link. Looks like it will work, but when it runs this code "GridView1.RenderControl(hw)", it gives an exception of "Control 'gridview1' of type 'GridView' must be placed inside a form tag with runat=server." I've tried to disable sorting and paging and that doesn't work. I've also tried pasting
Public Overridable Sub VerifyRenderingInServerForm ( _
      control As Control _
)
and it will not let me use this because it's not inside of the method. Where should I put that in code or is there another fix?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38755474
Put this within the same code behind class

Public Overrides Sub VerifyRenderingInServerForm ( control As Control )

End Sub
0
 

Author Closing Comment

by:jeremyzit
ID: 38755990
Worked Great, thanks for your help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question