PRB: Client-Side Spreadsheet Component Fails to Import Data from URL (286316)
The information in this article applies to:
- Microsoft Office 2003 Web Components
- Microsoft Office XP Web Components
- Microsoft Visual Basic, Scripting Edition 5.5
- Microsoft Visual Basic, Scripting Edition 5.0
This article was previously published under Q286316 SYMPTOMS
When you use the Office XP Spreadsheet component on a Web page in Microsoft Internet Explorer, you may receive the following error message:
Data cannot be imported from URL or file <path/filename>
The data is not on the same host computer as your current document, or the data has been copied from another host computer.
CAUSE
For the purposes of ensuring security in Internet Explorer, you cannot use the CSVURL, HTMLURL, or XMLURL properties to load data into a Spreadsheet component that is hosted on a Web page if the source file is not on the same computer from which the Web page originates. You will see this error when you use CSVURL, HTMLURL, or XMLURL to load a source file in the following situations: - You use a FILE:// protocol to browse to a Web page on a computer (either local or remote) and attempt to load data from a source file that is not stored on that computer.
- You use an HTTP:// protocol to browse to a Web page on a Web server and attempt to load data from a source file that is not stored on that Web server.
- You use the CreateObject function for the Spreadsheet component (OWC10.Spreadsheet) in client-side script and attempt to load data using one of these properties. Because Internet Explorer cannot determine the safety of the client site when you use CreateObject, loading data using the aforementioned properties fails regardless of where the source file is stored.
Note that these restrictions apply only to client-side script from a Web page. You can use the CSVURL, HTMLURL, or XMLURL properties in server-side script, such as Active Server Pages (ASP) or in Visual Basic, without these restrictions on source file location.
RESOLUTION
When you require that data be loaded into the Spreadsheet component with client-side script, use the CSVData, HTMLData, and XMLData properties instead of CSVURL, HTMLURL, and XMLURL.
STATUS
This behavior is by design.
REFERENCES
For more information, see the following Microsoft Web sites:
Modification Type: | Minor | Last Reviewed: | 8/23/2005 |
---|
Keywords: | kbOfficeWebSpread kbprb KB286316 |
---|
|