473,832 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Excel ListObject XPath error "...syntax is not correct or is not supported by Excel"

I am having a problem with an Excel ListObject in my C# .NET
application. I am trying to map an XML schema to a ListObject, and
continue to get the error "The XPath is not valid because either the
XPath syntax is incorrect or not supported by Excel." No matter what
crazy things I try, I can not either get it to work, or get a
different, more interesting error message. :-)

I have created my ListObject, and added a schema to my XmlMaps.

The xml which is created by the schema looks something like
--------------------------
<Document xmlns:msxsl="ur n:schemas-microsoft-com:xslt"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespace SchemaLocation= "H:\CurrentProj ects\RPM\WuPM\U ntitled4.xsd">
<Row Time="2001-12-17T09:30:47-05:00">
<Id.c72103dc-fba1-4743-a58e-ac53a6181058 Days_On_Stream= "3.14159"/>
<Id.bc6c92f0-cc6f-43ea-9d9a-ce94072e4348
Reactor_1_Inlet _Temperature="3 .14159"/>
....
</Row>
</Document>
--------------------------
Then I have a statement resembling
ListObject.List Columns[n].XPath.SetValue (myXmlMap, xpath_string,
null, true)
It seems that no matter what I pass as xpath_string, it is rejected.
I've tried
/Document/Row/Id.c72103dc-fba1-4743-a58e-ac53a6181058
//Id.c72103dc-fba1-4743-a58e-ac53a6181058
/Document//Id.c72103dc-fba1-4743-a58e-ac53a6181058
/Document//@Days_On_Stream
/Document/Row/Id.c72103dc-fba1-4743-a58e-ac53a6181058/@Days_On_Stream
//*@Days_On_Strea m
and what feels like an endless combination of others. The only success
I've had is with the Time attribute, where this path
/Document/Row/@Time
works.

I'm not having a lot of luck finding resources on the web that help me
identify what I'm doing wrong. Anybody have any advice?!

Thanks
Jacque

May 17 '06 #1
0 2152

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4390
by: Petr Prikryl | last post by:
Hi, Summary: In my opinion, the C-like prefix increment and decrement operators (++i and --i) should be marked as "syntax error". Current situation: try... (Python 2.4 (#60, ...)) >>> i = 1 >>> i
4
54854
by: jrasmussen | last post by:
I have created an Excel spreadsheet for the web. When it opens in IE 6.0 I get the message that the format is not supported. This is because it is in tab delimited format. Ane when I save the file, It saves it as txt. How can this file be created so that Excel sees it as an .xls format. I created the data in VB 6.0 with a vbtab to seperate the columns. Hope this is enough information. Thanks for the help,
1
2530
by: CA | last post by:
I am having a problem getting a pointer to an existing running Excel process on a client machine. Here are some details: 1) I have tested out the code on the development machine and it works fine. (Excel XP) 2) The code works fine on a machine in our offices with Excel 2000. 3) On the client machine (with Excel 2000), the code does not work. I wrote some diagnostic tests to further try and see what was going on
1
3274
by: Benny Ng | last post by:
Hi,All, Export Method: ------------------------------------------------------------------------- strFileNameExport = "Results" Response.Clear() Response.Buffer = True Response.ContentType ="application/vnd.ms-excel" 'application/msword
2
5213
by: Kathy Burke | last post by:
Hi, I'm using Dim xDoc as XmlDocument Dim xElem As xmlElement = xDoc("xpath") I then assign a variable to a value from the result node: Dim r As String = xElem.Attributes.GetNamedItem("name").Value This works fine unless there is no node returned, then I get an "object reference not set" error.
1
6128
by: sathyp | last post by:
Public Function SetPrinterDefaultsW(ByVal sPrinterName As String, _ ByVal nPaperSize As Long, ByVal nOrientation As Long) As Boolean Dim Prn As Printer Dim hPrinter As Long Dim pd As PRINTER_DEFAULTS Dim pinfo2 As PRINTER_INFO_2 Dim pinfo8 As PRINTER_INFO_8 Dim pinfo9 As PRINTER_INFO_9 Dim dm As DEVMODEW Dim yDevModeData() As Byte
0
1309
by: R2d2Rabeau | last post by:
Hi all, I have an application that manipulates excel files without any problem. The problem is for a certain folder where files are giving me an error: When I check those files Excel ask me to choose the file that best describes my data as the Text Wizard has determined that my data is delimited.... How can I modify my C# Net 2.0 M (COM Excel 11.0) program to bypass this error? I am surprised because in my program, "t" has already been...
0
2264
by: Harshpandya | last post by:
Hi I am using MYSQL and ASP.Net. to build the Data Reader Page. when i define my connection Key - it gives me this error.Keyword not supported: 'dsn'. MY PAGE Data Reader <%@ Page Language="C#" %> <%@ Import Namespace="System.Data.SqlClient" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server">
8
36620
by: rssd | last post by:
can somebody help me. I'm trying to read some excel files but i'm always getting this error No type library matching "Microsoft Excel" found at D:\Genes_datasets\exp.pl line 4 Win32::OLE(0.16): GetOleTypeLibObject() Not a Win32::OLE::TypeLib object at C:/Perl/site/lib/Win32/OLE/Const.pm line 45. Died at D:\Genes_datasets\exp.pl line 6. i don't ve microsoft excel but open office installed, i think that could be a problem. But these...
0
9795
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
9642
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
10781
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
10499
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
10212
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
9320
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...
1
7753
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5624
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...
2
3972
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.