Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A simple Excel "Get Value" function

Status
Not open for further replies.

Nightsoft

Programmer
Aug 23, 2001
50
DK
Hi.

I'm trying to get some data from a simple Excel file (*.xls)
But it dosn't seem to bee so easy at all.
I've searced trough the FAQ, and trough google and across the most of MSDN. And everything never exactly gives me what I Want.
This is my thing:

1. Get access to an Excel file from a webbrowser(No need to show it just have it open)
2. Take out the data cell by cell and print to screen in browser.

This should be very simple, but I just can't find a way.
First I started with ASP code Using ADO but I don't seem to get any thing out of the Excel File. And I found out that I was doing the pages on a Apache server, sooo....

Then I've tried ActiveX Components. I used "Microsoft Office Web Component" With the CLSID's :
1. [tt]0002E510-0000-0000-C000-000000000046[/tt]
and
2. [tt]0002E520-0000-0000-C000-000000000046[/tt]
They work, but I can't open a file in it. Ive found on MSDN that I should use the property called : [tt]"DataSource"[/tt]

so my code looked like this :
[tt]
<object id=&quot;MySpreadsheet&quot; data=&quot;test.xls&quot; classid=&quot;CLSID:0002E510-0000-0000-C000-000000000046&quot;>
<param name=&quot;DataSource&quot; value=&quot;test.xls&quot;>
</object>
[/tt]


But it dosn't open or show my Excel file. :-(
I'm still searching for answers. But if Anyone have a link or anythink I would be gratefull.-




Machine code Rocks:)
 
Not sure what you're after.

Are you generating a page from ASP, or are you trying to do this client-side?

Where is the Excel file? Client or server?

Best answer in any case is probably going to be to use ADO to get to the Excel data.

Look up Q257819 in the Microsoft Knowledge Base. This is a VB-oriented article, but much of it applies to VBScript.

Note that doing anything like this client-side is likely to give you security woes.

Thanks again to all you &quot;hackers&quot; who have made the web a huge pain of a place to do business.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top