Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Loading Excel sheet into Web component

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rishi  Dhupar - 23 Jan 2006 21:06 GMT
Hi,

My goal of my VB form is to be able to select certain things and then
display a filter spreadsheet using the Excel component in Microsoft
Office Spreadsheet 10.0 control.

Can someone tell me how to load an entire excel sheet into my component
sheet?  After that I should be able to figure out how to filter and
display only certain rows/columns.

Thanks,
RishiD
Chip Pearson - 23 Jan 2006 21:11 GMT
I think you have to loop through each cell in the worksheet.

Dim Rng As Range
Application.ScreenUpdating = False
For Each Rng In ActiveSheet.UsedRange.Cells
   Sheet1.Spreadsheet1.Range(Rng.Address).Value = Rng.Value
Next Rng
Application.ScreenUpdating = True

Signature

Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

> Hi,
>
[quoted text clipped - 12 lines]
> Thanks,
> RishiD
NickHK - 24 Jan 2006 04:40 GMT
Rishi,
Alternatively, have you looked at the OLE control to show Excel ?
It takes a little getting used to and I can't say it better than what you're
using now.

NickHK

> Hi,
>
[quoted text clipped - 8 lines]
> Thanks,
> RishiD
Rishi  Dhupar - 24 Jan 2006 15:49 GMT
Dim Rng As Range

For Each Rng In Sheet1.UsedRange.Cells
   Spreadsheet1.Range((Rng.Address)).Value = Rng.Value
Next Rng

This code seems to be working well, is there anyway to keep the
formatting of the text?

Thanks so much.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.