ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using the Microsoft Spreadsheet Control as ActiveX (https://www.excelbanter.com/excel-programming/281584-using-microsoft-spreadsheet-control-activex.html)

Lawrence[_6_]

Using the Microsoft Spreadsheet Control as ActiveX
 
Hi

I am using the Microsoft Office Spreadsheet component
which is in the Microsoft Office XP Web Components type
library.

I have this activex as a control on a form. I cannot work
out how to load data from an disk file, say "data.xls"

I would apprecaite some assistance.

lawrence

lawrence

Using the Microsoft Spreadsheet Control as ActiveX
 
Can someone try to help me with this ?


Lawrence
-----Original Message-----
Hi

I am using the Microsoft Office Spreadsheet component
which is in the Microsoft Office XP Web Components type
library.

I have this activex as a control on a form. I cannot work
out how to load data from an disk file, say "data.xls"

I would apprecaite some assistance.

lawrence
.


Carl Rapson

Using the Microsoft Spreadsheet Control as ActiveX
 
I have the same problem. I've looked all around, and apparently there is no
way for the spreadsheet control to load/save .XLS files programmatically.
You can, of course, use the control's toolbar to manually export the
control's data to Excel, and save from there. But I don't think you can do
the reverse.

I got around this by using .XML files instead of .XLS files. I created a
"template" spreadsheet in Excel and saved it as a .XML file from there.
Then, I use the XMLURL property of the spreadsheet control to load the file,
make my changes, and then use the Export method (with the
ssExportXMLSpreadsheet format option) to save it. It works for me because
Excel can also read/write XML files.

HTH,

Carl Rapson

"lawrence" wrote in message
...
Can someone try to help me with this ?


Lawrence
-----Original Message-----
Hi

I am using the Microsoft Office Spreadsheet component
which is in the Microsoft Office XP Web Components type
library.

I have this activex as a control on a form. I cannot work
out how to load data from an disk file, say "data.xls"

I would apprecaite some assistance.

lawrence
.




Lawrence Fisher

Using the Microsoft Spreadsheet Control as ActiveX
 
Thanks for the update.

What I did was I used the SaveAs property of the Excel COM object and
created the XMLSpreadsheet on the fly.

Then I used the XMLURL property to load the xml.

Thanks for the assistance

Lawrence



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 01:48 AM.

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