Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8772059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:56:49+00:00 2026-06-13T17:56:49+00:00

I am trying to load a .xls file into a webbrowser control in my

  • 0

I am trying to load a .xls file into a webbrowser control in my Windows Forms app in such a way that I can keep updating it with data programmatically.

So, for example, as the user presses a button on the form, the data in the Excel sheet updates.

I have managed to load the data into the control very easily:

WebBrowser1.Navigate(PathToXLSFile)

And, according to what I have read online, I should be able to now get control of that sheet using something along the lines of:

Dim wb As Object
WebBrowser1.Navigate(PathToXLSFile)
wb = WebBrowser1.Document

Now, I have tried putting that final line of code into BOTH the WebBrowser1_DocumentCompleted and the WebBrowser1_Navigated modules, but for both, I get that WebBrowser1.Document = Nothing.

I have looked online and found the solutions such as this, this and this, but none of them are working for me.

Again, what I’m looking to do is to load the Excel sheet into the webbrowser control (or another control if you have better ideas) and to be able to edit/change it via .NET.


As for my full scenario (why I need this):

Basically, my program generates a enormous amount of data that end-users want to see formatted in a particular way (often changing), so what I have done is create a formatted excel sheet with formulas referencing back to a table on a different excel sheet.
That way, all my program needs to do is spit out all the calculated values to the table and then the data is there for the users to see (and is very easily customizable without messing up my program).

The challenge is that now they want to see lots of iterations of this data on a windows form, so, basically what I need to do is each time they want to see the new data, calculate it on the fly and re-show it to them.

I figured out the DataGridView was very difficult to use here because of the complex formatting, so what I’m looking to do is show them the “Output” sheet (via a webBrowser control because that’s all that I could find) and have the ability to keep updating the “Input” sheet with new data such that the output sheet keeps updating.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T17:56:51+00:00Added an answer on June 13, 2026 at 5:56 pm

    Just to fully answer this question so anyone who faces this challenge in the future won’t have to knock their head against a brick wall like I did and will have something to guide them, here’s what I ended up doing:

    1. Opened my Excel workbook once in the background using Office.Interop – This allowed me to manipulate the data and use Excel’s calculation engine to update the data extremely quickly.
    2. Added to my form a PictureBox inside a Panel and set the Panel’s autoscroll = True

    Code used to display Excel output:

    Dim MyRange As Microsoft.Office.Interop.Excel.Range
    
    ... code ...
    
    MyRange.CopyPicture(Microsoft.Office.Interop.Excel.XlPictureAppearance.xlScreen,Microsoft.Office.Interop.Excel.XlCopyPictureFormat.xlBitmap)
    
    If Clipboard.GetDataObject IsNot Nothing Then
       Dim Data As IDataObject = Clipboard.GetDataObject
    
       If Data.GetDataPresent(DataFormats.Bitmap) Then
           Dim img As Image = Data.GetData(DataFormats.Bitmap, True)
    
           PictureBox1.Height = img.Height
           PictureBox1.Width = img.Width
           PictureBox1.Image = img
       End If
    End If
    

    I would definietly like to state, though, that this answer is 100% thanks to Tim Williams for his AMAZING direction and comments – Thanks!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to load a local file into a webbrowser control but this does not
I have an Excel file that I am trying to load into R using
Trying to load a small .txt file into mysql but get all my data
Trying to load a file into python. It's a very big file (1.5Gb), but
Im trying to load a csv file into a datatable using oledb. This is
im trying to load a external js (json) file (PhoneGap app) whose structure is
trying to load a single field into an array and then loading that in
Just trying to load a simple XML file in my Marmalade web app (based
I'm trying to load xls file with Jexcel API from http://udios.site88.net/Lunch.xls with this code:
trying to load some data into a table that has a foreign key constraint.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.