473,404 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Accessing data from an Excel generated XML Spreadsheet

I wish to use XPath to access data from within an Excel generated XML Spreadsheet (generated with MS Excel 2003). I am using an asp Web page (not .NET, not at this time). I instantiate MSXML.DomDocument.3.0. After loading the Excel generated XML Spreadsheet parse error free, I issue the following XPath query to create a set of row nodes from within the document:
Expand|Select|Wrap|Line Numbers
  1. "//Workbook/Worksheet[@ss:Name='Upload Data']/Table/Row"
I am greeted with the following error: Reference to undeclared namespace prefix: 'ss'. When I examine the Workbook element of the document I see clearly defined the namespace for 'ss' as well as others. I have fiddled around with the Excel generated XML Spreadsheet and have occassionally gotten the XPath query to work. However, I would like to be able to use the Excel generated XML Spreadsheet document without changes. Are there any suggestions as to what I might do or what I am doing that is wrong? Below is some asp test code that I use for evaluation:

Expand|Select|Wrap|Line Numbers
  1.     dim sXPath, objXML: set objXML = server.CreateObject("MSXML2.DOMDocument.3.0")
  2.     dim objRoot, objNode, objNodeList, objRows, objDataColumns, objData, v
  3.     dim sPath: sPath = "C:\Sample_Dataset.xml"
  4.     if objXML.load(sPath) then
  5.         objXML.setProperty "SelectionLanguage", "XPath"
  6.         set objNodeList = objXML.selectNodes("//Workbook/Worksheet[@ss:Name='Upload Data']/Table/Row")
  7.         for each objRows in objNodeList
  8.             set objDataColumns = objNode.selectNodes("./Cell/Data")
  9.             for each objData in objDataColumn
  10.                 v = objData.text
  11.             next
  12.         next
  13.     end if
  14.  
Dec 18 '06 #1
0 1713

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Ksenia Marasanova | last post by:
Hi, I have a little problem with encoding. Was hoping maybe anyone can help me to solve it. There is some amount of data in a database (PG) that must be inserted into Excel sheet and emailed....
1
by: JV | last post by:
Hi, I'm researching how I can : 1- dynamically generate an Excel spreadsheet by querying a database on an ASP page * I understand how to do this 2- open this spreadsheet by a user (client...
2
by: JM | last post by:
Hi I have created a Windows Form that takes input. When the Run button is pressed the form is disabled and the code checks some files and inputs the data into an Excel worksheet (that is hidden...
4
by: washoetech | last post by:
Hello, I am working on a project where I need to be able to grab the data from an Excel spreadsheet and create a new table in my database based on the columns in the spreadsheet. After the...
6
by: syvman | last post by:
Hi everyone... I am pulling my hair out trying to do this, and was wondering if someone could give me some assistance... I have an Excel spreadsheet containing several worksheets. I'd like to be...
0
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may...
0
by: ssrirao | last post by:
There is an Excel Spreadsheet containing data, residing in an internet site. It’s very easy to Import data from a local Excel Spreadsheet into SQL Server Database Table using DTS. But in my case...
1
by: vijaymohan | last post by:
Hi ..I am very new to perl..can some one help me with this script pls.. I am Querying database and writing data to excel.. Here is my script: #!/usr/bin/perl -w use strict; use DBI;
7
Merlin1857
by: Merlin1857 | last post by:
Its great producing data for users to look at in your web pages and generally that is sufficient for their needs but sometimes you may want to supply your user with the data in a form they can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.