ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Loading Excel sheet into Web component (https://www.excelbanter.com/excel-programming/351238-loading-excel-sheet-into-web-component.html)

Rishi Dhupar

Loading Excel sheet into Web component
 
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

Loading Excel sheet into Web component
 
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



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


"Rishi Dhupar" wrote in message
oups.com...
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




NickHK

Loading Excel sheet into Web component
 
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

"Rishi Dhupar" wrote in message
oups.com...
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




Rishi Dhupar

Loading Excel sheet into Web component
 
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.



All times are GMT +1. The time now is 07:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com