473,769 Members | 7,315 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing data from an Excel generated XML Spreadsheet

1 New Member
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.DomDocume nt.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 1746

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

Similar topics

9
3699
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. Nothing special, everything works. Except that non-ascii characters are not displayed properly. The data is stored as XML into a text field. When I use pgsql it's displayed good in the terminal. Now I run my script and print data
1
1561
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 side) * I understand how to do this
2
1811
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 so that I cannot watch as it gets filled up). When it is done it saves the Excel file. I find that if I go into another program while it's trying to work on the Excel spreadsheet that not all of the data appears (missing data!). If I click...
4
2308
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 table is created then I need to fill the table with the data from that spreadsheet. I am using ASP.NET 2.0 and SQL 2000 for my database. What would be the best way to do this? Should I go Excel to XML or Excel to a Dataset?
6
6374
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 able to take all of the data from the second column (B) of each worksheet and append that raw data to an access table. The columns in the spreadsheet do not have headers for use as field names (it's my assumption that my table should have a...
0
14422
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 be greater than 255 characters. 2. I have an access database. I link (not import) to the contents of the excel spreadsheet. In the design view in access, Column A has the data type "memo".
0
3235
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 the Excel spreadsheet resides an internet site which has a static name (Example xyz.xls) but varying data inside it. The spreadsheet contains three columns a, b, c and data below it. Only data get updated weekly So basically I have to automate...
1
2539
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
28903
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 actually do something more with. This code shows you how to display data from your database and then how to give that data to the user in the form of a useable Excel spreadsheet which they can then take away and play with themselves. The way I have shown...
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10219
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8876
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.