473,396 Members | 1,789 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,396 software developers and data experts.

I think they are the same - but Excel may not???

Hi;

This concerns Excel's SpreadsheetML format and how Excel writes it. Excel
saves an xml file as follows:

<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<WindwardReports dt:dt="string">Version: 4.0.12</WindwardReports>
</CustomDocumentProperties>
...

While XmlTextWriter (the way I am calling it) creates the following:
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<o:CustomDocumentProperties>
<WindwardReports dt:dt="string">Version: 4.0.12</WindwardReports>
</o:CustomDocumentProperties>
...

Isn't o:CustomDocumentProperties the same thing as CustomDocumentProperties
xmlns="urn:schemas-microsoft-com:office:office"?

And if so, why does Excel include the xmlns, especially as it only does it
for a couple of nodes?

--
thanks - dave
Nov 12 '05 #1
9 1437
Hi Dave,

No, they are different. o:CustomDocumentProperties is in the namespace
"urn:schemas-microsoft-com:office:office", while CustomDocumentProperties
is in the default namespace "urn:schemas-microsoft-com:office:spreadsheet".
In Xml, they are completely different.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #2
Does this mean:
<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<WindwardReports dt:dt="string">Version: 4.0.12</WindwardReports>
</CustomDocumentProperties>

That CustomDocumentProperties is in the default namespace and
WindwardReports is in the namespace urn:schemas-microsoft-com:office:off
because the xmlns="urn:schemas-microsoft-com:office:office" means that is now
the default namespace for any children of CustomDocumentProperties - but not
for CustomDocumentProperties itself?

thanks - dave
--
thanks - dave
"Kevin Yu [MSFT]" wrote:
Hi Dave,

No, they are different. o:CustomDocumentProperties is in the namespace
"urn:schemas-microsoft-com:office:office", while CustomDocumentProperties
is in the default namespace "urn:schemas-microsoft-com:office:spreadsheet".
In Xml, they are completely different.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #3


David Thielen wrote:
Does this mean:
<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<WindwardReports dt:dt="string">Version: 4.0.12</WindwardReports>
</CustomDocumentProperties>

That CustomDocumentProperties is in the default namespace and
WindwardReports is in the namespace urn:schemas-microsoft-com:office:off
because the xmlns="urn:schemas-microsoft-com:office:office" means that is now
the default namespace for any children of CustomDocumentProperties - but not
for CustomDocumentProperties itself?


No, with that markup as above the root element
<CustomDocumentProperties> is in the namespace
urn:schemas-microsoft-com:office:office and its child element
<WindwardReports> is in that namespace as well.

But the whole snippet lacks a binding for the prefix dt so it is not
well-formed XML with namespaces.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Nov 12 '05 #4
Hello;

Either I am totally missing something or your and Kevin's emails contradict
each other. My original question was:

start =====>
This concerns Excel's SpreadsheetML format and how Excel writes it. Excel
saves an xml file as follows:

<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<WindwardReports dt:dt="string">Version: 4.0.12</WindwardReports>
</CustomDocumentProperties>
...

While XmlTextWriter (the way I am calling it) creates the following:
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<o:CustomDocumentProperties>
<WindwardReports dt:dt="string">Version: 4.0.12</WindwardReports>
</o:CustomDocumentProperties>
...

Isn't o:CustomDocumentProperties the same thing as CustomDocumentProperties
xmlns="urn:schemas-microsoft-com:office:office"?

And if so, why does Excel include the xmlns, especially as it only does it
for a couple of nodes?
<=====end

Kevin said in the above "o:CustomDocumentProperties is in the namespace
"urn:schemas-microsoft-com:office:office", while CustomDocumentProperties
is in the default namespace "urn:schemas-microsoft-com:office:spreadsheet"."

But I believe you are saying:
<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
"<CustomDocumentProperties> is in the namespace
urn:schemas-microsoft-com:office:office"

What am I missing here?

--
thanks - dave
"Martin Honnen" wrote:


David Thielen wrote:
Does this mean:
<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<WindwardReports dt:dt="string">Version: 4.0.12</WindwardReports>
</CustomDocumentProperties>

That CustomDocumentProperties is in the default namespace and
WindwardReports is in the namespace urn:schemas-microsoft-com:office:off
because the xmlns="urn:schemas-microsoft-com:office:office" means that is now
the default namespace for any children of CustomDocumentProperties - but not
for CustomDocumentProperties itself?


No, with that markup as above the root element
<CustomDocumentProperties> is in the namespace
urn:schemas-microsoft-com:office:office and its child element
<WindwardReports> is in that namespace as well.

But the whole snippet lacks a binding for the prefix dt so it is not
well-formed XML with namespaces.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Nov 12 '05 #5


David Thielen wrote:

This concerns Excel's SpreadsheetML format and how Excel writes it. Excel
saves an xml file as follows:

<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
So that <Workbook> element is in the namespace
urn:schemas-microsoft-com:office:spreadsheet.
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
That <CustomDocumentProperties> element is in the namespace
urn:schemas-microsoft-com:office:office.

While XmlTextWriter (the way I am calling it) creates the following:
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
That <Workbook> element is in the namespace
urn:schemas-microsoft-com:office:spreadsheet.
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<o:CustomDocumentProperties>


So that <CustomDocumentProperties> element (or
o:CustomDocumentProperties> element if you want) is in the namespace
urn:schemas-microsoft-com:office:office.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Nov 12 '05 #6
Hello;

That is how I interpreted it too. But doesn't that mean that both of the
ways listed are identical? Because in both cases "<CustomDocumentProperties>
element is in the namespace urn:schemas-microsoft-com:office:office"

Or is there a difference between the two approaches?

--
thanks - dave
"Martin Honnen" wrote:


David Thielen wrote:

This concerns Excel's SpreadsheetML format and how Excel writes it. Excel
saves an xml file as follows:

<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"


So that <Workbook> element is in the namespace
urn:schemas-microsoft-com:office:spreadsheet.
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">


That <CustomDocumentProperties> element is in the namespace
urn:schemas-microsoft-com:office:office.

While XmlTextWriter (the way I am calling it) creates the following:
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"


That <Workbook> element is in the namespace
urn:schemas-microsoft-com:office:spreadsheet.
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<o:CustomDocumentProperties>


So that <CustomDocumentProperties> element (or
o:CustomDocumentProperties> element if you want) is in the namespace
urn:schemas-microsoft-com:office:office.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Nov 12 '05 #7

David Thielen wrote:
But doesn't that mean that both of the
ways listed are identical? Because in both cases "<CustomDocumentProperties>
element is in the namespace urn:schemas-microsoft-com:office:office"


Yes, the namespace of the elements is the same in both cases. In terms
of XML with namespaces there is no difference. Only if someone wrote a
DTD where namespace support is poor or not existing the DTD might
prescribe to have a certain way.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Nov 12 '05 #8
Thank you very very much.

--
thanks - dave
"Martin Honnen" wrote:

David Thielen wrote:
But doesn't that mean that both of the
ways listed are identical? Because in both cases "<CustomDocumentProperties>
element is in the namespace urn:schemas-microsoft-com:office:office"


Yes, the namespace of the elements is the same in both cases. In terms
of XML with namespaces there is no difference. Only if someone wrote a
DTD where namespace support is poor or not existing the DTD might
prescribe to have a certain way.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Nov 12 '05 #9
Hi;

I think these are different - but not as discussed. The difference is the
namespace for <WindwardReports as <CustomDocumentProperties
xmlns="urn:schemas-microsoft-com:office:office"> changes the default
namespace assigned to <WindwardReports while <o:CustomDocumentProperties>
does not.

So while CustomDocumentProperties is the same both ways, WindwardReports is
not.

Is that correct?

--
thanks - dave
"David Thielen" wrote:
Hi;

This concerns Excel's SpreadsheetML format and how Excel writes it. Excel
saves an xml file as follows:

<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<WindwardReports dt:dt="string">Version: 4.0.12</WindwardReports>
</CustomDocumentProperties>
...

While XmlTextWriter (the way I am calling it) creates the following:
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<o:CustomDocumentProperties>
<WindwardReports dt:dt="string">Version: 4.0.12</WindwardReports>
</o:CustomDocumentProperties>
...

Isn't o:CustomDocumentProperties the same thing as CustomDocumentProperties
xmlns="urn:schemas-microsoft-com:office:office"?

And if so, why does Excel include the xmlns, especially as it only does it
for a couple of nodes?

--
thanks - dave

Nov 12 '05 #10

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

Similar topics

2
by: RF | last post by:
Before .Net if I wanted to control an application that exposed a COM interface all I needed to do was to create an object of that application and call the appropriate methods. For example a VB app...
3
by: zxo102 | last post by:
Hi there, I need your help for python <--> excel. I want to paste selected cells (range) to different location on the same sheet in Excel through python. I have tried it for a while but could not...
23
by: JDeats | last post by:
Just spent some time browsing around here: http://msdn.microsoft.com/Longhorn/ I can see the benefits from WinFS (as long as we tag all in-coming data this should be nice, tagging everything...
4
by: Hitesh | last post by:
Hi, I have three datagrid control on my aspx page and one export to excel button, i want to export all the 3 datagrids contents in one excel file. how can i achive that? -- Thanks Hitesh
2
by: Verde | last post by:
I currently let users upload files (graphics) to a Web site. I want to limit the size of graphics, so I have the following in Web.config <httpRuntime maxRequestLength="110" /> That works just...
3
by: Atley | last post by:
I have made an application in VB.net 2003 and in it I create a Excel Workbook with several spreadsheets in it. When the code is finished creating the spreadsheets the workbook is saved to the...
4
by: Chris Gilpin | last post by:
Hey everybody. I have Access set up using VBA to run a bunch of queries automatically, and then export the results into Excel. The only problem is, I want each query to be exported to the same...
1
by: Rajeswary | last post by:
I need to copy an excel doc in the same directory with a new name.. That is I have got an excel file abd_Week 37 and I need to run a batch script to copy the same file to the same directory with...
1
by: 127mohit | last post by:
Hi all, I have a simple code that exports an HTML table on an ASP page to excel. The code works fine, however if the original text in the HTML table had a particular colour, it is not exported in...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.