xml/xsl to create msbuild files........MSB4097......and an xsl workarounds(??)

<!--  The xml in question         -->

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="AllTargetsWrapper" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--  - - -->
  <Target Name="AllTargetsWrapper" xmlns="">
    <Message Text="You just called the Target named 'AllTargetsWrapper'" />
  </Target>
  <!--  - - -->
  <Target Name="Target1" xmlns="">
    <Message Text="You just called the Target named 'Target1'" />
  </Target>
  <!--  - - -->
  <Target Name="Target2" xmlns="">
    <Message Text="You just called the Target named 'Target2'" />
  </Target>
  <!--  - - -->
  <Target Name="Target3" xmlns="">
    <Message Text="You just called the Target named 'Target3'" />
  </Target>
  <!--  - - -->
</Project>


<!--          -->




The backstory of this post is here:
https://connect.microsoft.com/VisualStudio/feedback/details/96102/msbuild-does-not-accept-valid-child-nodes-that-contain-the-xmlns-namespace-attribute-even-if-its-the-correct-one

Basically, there are some msbuild/xml issues.
The wonderful error you get is:
error MSB4097: The element <Target> beneath element <Project> may not have a 
custom XML namespace.


There are some suggestions at the site.
One is "write out the xml/reload it, then add elements".
The other one is "use the msbuild object library".
Neither is especially desirable.


I only recently found the issue at the connect.microsoft.com site......I put 
in some heavy work creating some lightweight xml and then an xsl transform 
sheet to create my msbuild project file.
Aka, I just did alot a work before I hit this monkey wrench.  :<

At the top of this post ......there is the (resultant xml from my transform) 
is currently what I'm stuck with.

The issue are these orphaned
xmlns=""
values.


Because of the bug......(outlined in the URL above)...

you cannot have this xml (below is a copy from the xml above):
  <Target Name="AllTargetsWrapped" xmlns="">

AND you cannot do this:
  <Target Name="AllTargetsWrapped" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">


The end result has to be:


<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="AllTargetsWrapper" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--  - - -->
  <Target Name="AllTargetsWrapper">  <!-- Emphasis here because there is no 
xmlns value -->
    <Message Text="You just called the Target named 'AllTargetsWrapper'" />
  </Target>
  <!--  - - -->
  <Target Name="Target1">
    <Message Text="You just called the Target named 'Target1'" />
  </Target>
  <!--  - - -->
  <Target Name="Target2">
    <Message Text="You just called the Target named 'Target2'" />
  </Target>
  <!--  - - -->
  <Target Name="Target3">
    <Message Text="You just called the Target named 'Target3'" />
  </Target>
  <!--  - - -->
</Project>




==============

Here is a very basic (and does-not-do-anything-interesting) example of some 
xml and xsl which creates the issue:

<!-- START XML -->

<?xml version="1.0" encoding="utf-8"?>
<root>
  <demoTargets>
    <demoTarget>
      <targetName>AllTargetsWrapper</targetName>
    </demoTarget>
    <demoTarget>
      <targetName>Target1</targetName>
    </demoTarget>
    <demoTarget>
      <targetName>Target2</targetName>
    </demoTarget>
    <demoTarget>
      <targetName>Target3</targetName>
    </demoTarget>
  </demoTargets>
</root>


<!-- END XML -->

<!-- START XSL-->

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
version="2.0">
  <xsl:strip-space elements="*" />
  <xsl:output method="xml" />
  <!-- -->
  <xsl:template match="/">
    <!-- -->
    <Project DefaultTargets="AllTargetsWrapper" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <xsl:comment>  -- </xsl:comment>
      <xsl:call-template name="CreateTargetsTemplate"></xsl:call-template>
      <!-- -->
    </Project>
    <!-- -->
  </xsl:template>
  <!-- -->
  <xsl:template name="CreateTargetsTemplate">
    <!-- -->
    <xsl:for-each select="//root/demoTargets/demoTarget">
      <xsl:element name="Target">
        <xsl:attribute name="Name">
          <xsl:value-of select="./targetName" />
        </xsl:attribute>
        <xsl:element name="Message">
          <xsl:attribute name="Text">You just called the Target named 
'<xsl:value-of select="./targetName" />'</xsl:attribute>
        </xsl:element>
      </xsl:element>
      <xsl:comment>  -- </xsl:comment>
    </xsl:for-each>
    <!-- -->
  </xsl:template>
  <!-- -->
</xsl:stylesheet>


<!-- END XSL-->

<!-- START DESIRED RESULT -->

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="AllTargetsWrapper" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--  - - -->
  <Target Name="AllTargetsWrapper"  />
  <!--  - - -->
  <Target Name="Target1"  />
  <!--  - - -->
  <Target Name="Target2"  />
  <!--  - - -->
  <Target Name="Target3"  />
  <!--  - - -->
</Project>


<!-- END DESIRED RESULT -->






<!-- START RESULT1 THAT DOES NOT WORK -->

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="AllTargetsWrapper" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--  - - -->
  <Target Name="AllTargetsWrapper" xmlns="" />
  <!--  - - -->
  <Target Name="Target1" xmlns="" />
  <!--  - - -->
  <Target Name="Target2" xmlns="" />
  <!--  - - -->
  <Target Name="Target3" xmlns="" />
  <!--  - - -->
</Project>

<!-- END RESULT1 THAT DOES NOT WORK -->

<!-- START RESULT2 THAT DOES NOT WORK -->


<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="AllTargetsWrapper" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--  - - -->
  <Target Name="AllTargetsWrapper" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  </Target>
  <!--  - - -->
  <Target Name="Target1" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  </Target>
  <!--  - - -->
  <Target Name="Target2" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  </Target>
  <!--  - - -->
  <Target Name="Target3" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  </Target>
  <!--  - - -->
</Project>

<!-- END RESULT2 THAT DOES NOT WORK -->



If you want to see this issue "in action"........then take the xml and xsl 
above (the slimmed down version xml/xsl pair I have above)
Transform it, and put the resultant xml in a file called 
"MSBuildXmlIssueTransformOutput.xml"

Create a .bat file
And put this in the .bat file

<!-- START BAT FILE -->

@echo off
ECHO     Demonstrate MSBuild create Own Xml Issue:
ECHO .

@echo on

set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v3.5
set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v2.0.50727

call %msBuildDir%\msbuild /target:AllTargetsWrapper 
"MSBuildXmlIssueTransformOutput.xml" /p:Configuration=Release 
/l:FileLogger,Microsoft.Build.Engine;logfile=MSBuildXmlIssueOutput.log

set msBuildDir=

<!-- END BAT FILE -->


You will see that you get MSBuild issues unless the xml is like "START 
DESIRED RESULT" format above.


Any hope for this one?  I've read the suggestions at connect.microsoft.com 
and it just undermines my efforts I just put in.

Even if I have to perform two transformations, that is an option...........
I'm "ok" (skill-wise) with xsl, but thought I would post this issue to 
people alot better at xsl than I am.


And I appreciate you looking, but comments along the lines of
"You don't have to use <xsl:element></xsl:element> , you can write it 
shorter using ______________" are especially helpful on this one.
I'll rework the xsl to be trimmer if I find a workaround...I promise!



The engines I have available are.

DotNet Xml/Xsl Libraries, 3.5 Framework.
Saxon (in a pinch that is) ("C:\Program 
Files\MSBuild\SaxonHE\bin\Transform.exe")
MSXML2.DOMDocument.6.0




Thanks for any help.


I'm probably gonna document some of this over on the connect.microsoft.com 
site as well.......since I went to trouble of creating some samples.




0
sloan5710 (6)
2/8/2010 9:05:49 PM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
2356 Views

Similar Articles

[PageSpeed] 2

sloan wrote:

> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
> version="2.0">

You simply need to put your namespace declaration on the xsl:stylesheet 
element, that way it applies to all literal result elements so use

<xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
   version="2.0">

instead of what you have above.

And then you can drop the namespace declaration below:


>   <xsl:template match="/">
>     <!-- -->
>     <Project DefaultTargets="AllTargetsWrapper" 
> xmlns="http://schemas.microsoft.com/developer/msbuild/2003">




-- 

	Martin Honnen --- MVP XML
	http://msmvps.com/blogs/martin_honnen/
0
mahotrash (1777)
2/9/2010 1:00:56 PM
Martin,

THANK YOU, it works just as you said.

I'm posting my basic-setup scenario xml and xsl so future googlers 
(errrr......bingers) will find a basic and working example.

Again, thank you very much.



<!-- START XML -->

<?xml version="1.0" encoding="utf-8"?>
<root>
  <demoTargets>
    <demoTarget>
      <targetName>AllTargetsWrapper</targetName>
    </demoTarget>
    <demoTarget>
      <targetName>Target1</targetName>
    </demoTarget>
    <demoTarget>
      <targetName>Target2</targetName>
    </demoTarget>
    <demoTarget>
      <targetName>Target3</targetName>
    </demoTarget>
  </demoTargets>
</root>

<!-- END XML -->


<!-- START XSL THAT WORKS VIA INSTRUCTIONS IN PREVIOUS POST  -->


<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
   version="2.0">
<!--  <xsl:strip-space elements="*" />  -->
  <xsl:output method="xml" />
  <xsl:variable name="AllTargetsWrapperConstant">
    <xsl:value-of select="'AllTargetsWrapper'" />
  </xsl:variable>
  <!-- -->
  <xsl:template match="/">
    <!-- -->
    <Project DefaultTargets="AllTargetsWrapper" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <xsl:comment>  -- </xsl:comment>
      <xsl:call-template name="CreateTargetsTemplate"></xsl:call-template>
      <!-- -->
     <xsl:comment>  -- </xsl:comment>
    </Project>
    <!-- -->
  </xsl:template>
  <!-- -->
  <xsl:template name="CreateTargetsTemplate">
    <!-- -->
   <xsl:comment>  -- </xsl:comment>
    <xsl:for-each select="//root/demoTargets/demoTarget">
      <xsl:element name="Target">
        <xsl:attribute name="Name">
          <xsl:value-of select="./targetName" />
        </xsl:attribute>
        <xsl:element name="Message">
          <xsl:attribute name="Text">You just called the Target named 
'<xsl:value-of select="./targetName" />'</xsl:attribute>
        </xsl:element>
        <xsl:if test="targetName = $AllTargetsWrapperConstant">
          <xsl:comment> The above special target name will call all targets 
</xsl:comment>
          <xsl:call-template 
name="CreateAllTargetsSpecialTemplate"></xsl:call-template>
        </xsl:if>
      </xsl:element>
      <xsl:comment>  -- </xsl:comment>
    </xsl:for-each>
    <!-- -->
   <xsl:comment>  -- </xsl:comment>
  </xsl:template>
  <!-- -->
  <xsl:template name="CreateAllTargetsSpecialTemplate">
    <!-- -->
    <xsl:for-each select="//root/demoTargets/demoTarget[targetName != 
$AllTargetsWrapperConstant]">
      <xsl:element name="CallTarget">
        <xsl:attribute name="Targets">
          <xsl:value-of select="./targetName" />
        </xsl:attribute>
      </xsl:element>
     <xsl:comment>  -- </xsl:comment>
    </xsl:for-each>
    <!-- -->
  </xsl:template>
  <!-- -->
</xsl:stylesheet>



<!-- END XSL-->


=============================

<!-- START BAT FILE WHICH CALLS OUTPUT FROM ABOVE-->
<!-- Note, the output from above should be persisted in a file called 
"MSBuildXmlIssueOutput.xml" -->


@echo off
ECHO     Demonstrate MSBuild create Own Xml Issue:
ECHO .

@echo on

REM set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v3.5
set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v2.0.50727

call %msBuildDir%\msbuild /target:AllTargetsWrapper 
"MSBuildXmlIssueOutput.xml" /p:Configuration=Release 
/l:FileLogger,Microsoft.Build.Engine;logfile=MSBuildXmlIssueOutput.log

set msBuildDir=

<!-- END BAT FILE WHICH CALLS OUTPUT FROM ABOVE-->


<!-- START Contents of MSBuildXmlIssueOutput.xml (after performing the 
xml/xsl transformation above)(Just to show what I got and that Martin's 
advice was spot-on -->

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="AllTargetsWrapper" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--  - - -->
  <!--  - - -->
  <Target Name="AllTargetsWrapper">
    <Message Text="You just called the Target named 'AllTargetsWrapper'" />
    <!-- The above special target name will call all targets -->
    <CallTarget Targets="Target1" />
    <!--  - - -->
    <CallTarget Targets="Target2" />
    <!--  - - -->
    <CallTarget Targets="Target3" />
    <!--  - - -->
  </Target>
  <!--  - - -->
  <Target Name="Target1">
    <Message Text="You just called the Target named 'Target1'" />
  </Target>
  <!--  - - -->
  <Target Name="Target2">
    <Message Text="You just called the Target named 'Target2'" />
  </Target>
  <!--  - - -->
  <Target Name="Target3">
    <Message Text="You just called the Target named 'Target3'" />
  </Target>
  <!--  - - -->
  <!--  - - -->
  <!--  - - -->
</Project>

<!-- END Contents of MSBuildXmlIssueOutput.xml (after performing the xml/xsl 
transformation above) -->






"Martin Honnen" <mahotrash@yahoo.de> wrote in message 
news:O7aktfYqKHA.6064@TK2MSFTNGP02.phx.gbl...
> sloan wrote:
>
>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
>> version="2.0">
>
> You simply need to put your namespace declaration on the xsl:stylesheet 
> element, that way it applies to all literal result elements so use
>
> <xsl:stylesheet
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
>   version="2.0">
>
> instead of what you have above.
>
> And then you can drop the namespace declaration below:
>
>
>>   <xsl:template match="/">
>>     <!-- -->
>>     <Project DefaultTargets="AllTargetsWrapper" 
>> xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
>
>
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://msmvps.com/blogs/martin_honnen/ 


0
sloan5710 (6)
2/9/2010 2:10:19 PM
Reply:

Similar Artilces:

how do i create an excel formula to work out a date x amount of w.
how do i create an excel formula to work out a date x amount of weeks ahead from a given date. ie Start date 1/10/04 Contract Duration 27 weeks Result date? This is what i am trying to acheive, any help would be appreciated. Thanks Hi With date in A2 =A2+7*27 -- Arvi Laanemets (When sending e-mail, use address arvil<At>tarkon.ee) "Ska" <Ska@discussions.microsoft.com> wrote in message news:9BF11EA1-893B-4D09-A5A0-39C5E1E5CEE7@microsoft.com... > how do i create an excel formula to work out a date x amount of weeks ahead > from a given date. ie > Start ...

Log Files Ex 2003
I have a large number of log files being generated in the mdbdata directory on my exchange server 2003 ie E0000239.log. It is running my server out of disk space. I assumed these where due to circular logging but am not sure. How do I stop these from building up and can I safely remove them (They are all backed up). thanks for the support. This is normal when circular logging is turned off, which is recommended. The correct way to remove these log files is to perform an Exchange full backup using an Exchange-aware backup application (like Windows Backup on the actual Exchange server its...

Desktop shortcut opens app but will not open file
When one of my users clicks on a desktop shortcut (MS Excel), the program opens but the file will not. The user can open the file directly by going into Excel and clicking open , file, etc. Thanks, Glen This are the usual things to fix this Tools>Options>General uncheck "Ignore other Applications" Exit Excel and try again If this doesn't work try to re-register Excel Close Excel first and On the Windows Taskbar 1 ) Start>Run "excel.exe /unregserver"(no quotes)>OK. 2) Start>Run "excel.exe /regserver"(no quotes)>OK. See the space be...

File Name Length
Does anyone know if filenames can be longer than 31 characters in Office 2004? Thanks. In article <19bee01c41cec$47393e90$a401280a@phx.gbl>, "JM" <doubledawg9498@yahoo.com> wrote: > Does anyone know if filenames can be longer than 31 characters in Office > 2004? Thanks. FIrst, you *can* have filenames longer than 31 characters in Office v.X already - you just can't generate them. While v.X apps display a hash at the end of a long filename, it keeps the filename intact when you save. MS hasn't announced anything regarding long file names in 2004 ye...

Why does Exchange create its own profiles?
I had to recreate a user's Outlook profile, and when I went into the Control Panel, Mail, there were 35 BACKUP profiles, just called BACKUP ## or Outlook. I removed them, did the work I had to do, and checked again, and another one had been created. This one user gets this every time they open Outlook. Has anyone else come across this, or have any suggestions on what to check? We use Exchange 2003. ...

Programmatically listing Relationships of ADP file
I'm fairly new to access and would like to get a listing of the relationships in the ADP file. How would I go about doing that programmatically? I haven't the first idea of where to start. I did find something that said to loop through the relationships collection, but I can't seem to find it. FWIW, I'm fairly fluent in Excel VBA. Thanks, Barb Reinhardt On Tue, 23 Mar 2010 12:30:01 -0700, Barb Reinhardt <BarbReinhardt@discussions.microsoft.com> wrote: A good start would be to open a VBA window, click the Help button, and look for Relationships...

emailing Outlook contact files
Help, Why am I unable to export my contacts & then attach the ..pst file in an email? I want to use my 97 Outlook contacts on my 200 Outlook on my home machine. Thanks! Export the contacts. then shut down Outlook and reopen. Then try sending the .pst file home. Also, make sure the file size is acceptable to your ISP who usually put a limit of 2-5 mbs for attachments. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After searching google.groups.com and finding no answer Greg <greg@mrcifoundation.info> asked: | Help, | | Why am...

Open outlook express eml files with Office Outlook
How can I get my Microsoft Outlook e-mail software to open a Outlook Express .eml file save on a network. My objective is to be able to double click the .eml file or drag and drop it into my Microsoft Outlook application. Thank you, LS Lance <llscott@csicable.net> wrote: > How can I get my Microsoft Outlook e-mail software to > open a Outlook Express .eml file save on a network. My > objective is to be able to double click the .eml file or > drag and drop it into my Microsoft Outlook application. You have to open in with Outlook Express and then move it to Outlook fro...

Traversing XML with Linq to XML
Hi I am struggling to navigate an XElement and I'm not sure what is going wrong. Here's my XML via vb's xml literals Dim l_testSchema = _ <Mappings> <Definitions> <ItemGroup> <Parent>Table</Parent> <Name>Name</Name> </ItemGroup> <Item> <Parent>Column</Parent> <Name>Name</Name> &l...

Help!!Getting audio files to play continuously during slide show?!
I have Powerpoint 2002, and i am having a hard time getting the music file to play continuously during the slide show. it plays on the first slide (which is the only slide that has the little speaker picture on it), but then it doesn't transition to the next slide until after the song is done, when i want the song to play while the slides are transitioning. HELP please! Mega, Have a look here and see if it helps, there are tuturials in video demonstrating the process. http://www.pptfaq.com/FAQ00047.htm -- Luc Sanders MVP - PowerPoint "MegaB86" <MegaB86...

Creating forwarding rule in Exchange
Exchange 2003 SP2 If I have user fee@domain.com receiving email at address fee@domain.com, is it possible to create a rule in Exchange that does this: All emails from user@outsidedomain.com that go to fee@domain.com should be forwarded to foo@domain.com If it is possible, and I do not have a domain user named foo, would I have to create one or simply create a contact in order for the mailbox to be created? 1. You need some recipient to have the email address fee@domain.com 2. No native facility to selectively forward mail from a particular smtp address only. You could either do it usi...

my CStatic class : how to create a derived class
I want to derive a CStatic (let's call it CMyStatic) class to create a static box with a white background. So thanks to the classwizard I have done a new class derived from a CStatic and I have overidden the OnCtlColor message like this : CMyStatic::CMyStatic() { } CMyStatic::~CMyStatic() { } BEGIN_MESSAGE_MAP(CMyStatic, CStatic) //{{AFX_MSG_MAP(CMyStatic) ON_WM_CTLCOLOR() //}}AFX_MSG_MAP END_MESSAGE_MAP() //////////////////////////////////////////////////////////////////////////// / // CMyStatic message handlers HBRUSH CMyStatic::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { H...

can't create item
can't create item, when i hit a link to e mail on a internet explorer . i get the error mesge .cant create item ...

SumIf
Hi =SUMIF(A6:A2000,"(left(a6:a2000,4))=(left($K$14,4))",F6:F2000) I want to create a sub total of all values in column F, at certain subtotal cells in column F where the the first 4 (or other to be set)characters of a code in cells a6 to a2000 match the first 4 characters in cell$K$14 (or other cell to be set). The above doesn't seem to work, is it possible? am I missing something? Any help would be greatly appreciated. Ritchi Try this array* formula: =SUM(IF(LEFT(A$6:A$2000,4)=LEFT($K$14,4),F$6:F$2000,0)) * As this is an array formula, then once you have typed it in (or s...

Losing all formatting in Excel 2007 files
I have Office 2007 running on an XP desktop and a Windows 7 laptop. I work on an Excel .xlsx file on my desktop but when I open it on my laptop all of the formatting is lost. I have had this exact same problem except vista to xp. I wouldn't lose all of the formatting, but some words would would be on different lines. Other things I have noticed is that my Office 2007 on Vista doesn't always have the same fonts as on my Office 2007 XP. I think the formatting issue is more of a compatibility issue. ...

deleted pst file still appears
Outlook XP, SP-2. I moved my .pst file to another drive by copying it, adding the copy to Outlook, and making the new one the default for my email account. OK so far. Then I removed the original data file and restarted Outlook. The "Personal Folders" for that file still appears. I deleted the actual file to see if Outlook would realize it wasn't there. The "Personal Folders" for that file still appears. When i try to close the obsolete item from the folder list pane, I get a "The operation failed. "An object cannot be found" dialog. Mail...

link to specific sheet in excel file which contains points and spaces
I am trying to make a link in Acces to an Excel file. This excel file contains several sheet with different names. My form in Access has a field that corresponds to the name of the excel sheets (Formname in script). When the name in the form contains points or spaces my link to the sheet with the same name does not work. I tried to put brackets [] on either side of the name, but then linking does not work at all. Please let me know if you have any suggestions. Code (works when Formname.Value does not contain spaces or points etc): Private Sub CommandActionRegister3_Click() Dim Locatio...

CSV formatted text file to Excel
Hi all, I am writing a small VC++ application of how to import the CSV formatted ..txt file to excel. I am facing problem while parsing the text file. "TicketNo","CarNo","PersonAge" 12534 , 763534 , 23 12345 , 624333, 24 The problem is in MFC there is a SetValue2(CoeVariant:column data) method in which if i will pass an array(12534) then it will be imported to excel.For example IfI will search for the "employee number" field in text file then the values passed to SetValue2()should be 12543 and 12345.But Using C++ I cannot do so as I...

XML Map
Hi all, I import XML data into a worksheet, and choose a mapping name, but I have no idea how to change the path so that it is dynamic. I've been trying to find a way to set my mapping paths to dynamic, so that when I move the folder that contains the xl file and xml files, the mapping path still works. Help :) Cheers, Grant. I'm not sure you can make it 'dynamic' per se but you can write code to change. Here's a sample of changing the bound xml document. ActiveWorkbook.XmlMaps(1).DataBinding.LoadSettings ("C:\Services Proposal.xml") -- Charles...

"files based on content, not file extension" option issue
Hi, I met a strange question. When I disable "files based on content, not file extension" option in IE browser (IE -->Tools Options-->Security-->Internet zone-->Custom level --> "files based on content, not file extension" disable). When I used IE to access ftp://ftp.microsoft.com via. proxy, such as: ccproxy..etc. IE browser shows HTML source code instead of normal html webpage. Could you take a look? Always state your full Windows version (e.g., WinXP SP3; WinXP 64-bit SP2; Vista SP1; Vista 64-bit SP2; Win7; Win7 64-bit) as well...

Temp file plague
For some reason my XL2000 if saving reams of temp files (X.TMP) in the folder where I open a worksheet. I haven't intentionally set (or re-set) any preferences for that. Does anyone know what's up here? ...

saving file from asp.net
Hi all, I dynamically generate Word Documents from my web application using XmlDocument object and need to save them on a mapped network drive. I use the Save method of XmlDocument object to save documents. Ican save them successfully on local drive on web server. But when I try to save them on a mapped network drive, I get permission denied errors. I made sure that ASPNET had full access right in the folder where I need to save documents. I also tried using UNC path, but that also does not work. Can someone please point to what I may be doing wrong and explain the whole setup proces...

create a database
Steve can you email me I really need a database created as well and will pay you the fee. Sheryl On Sun, 21 Mar 2010 10:26:01 -0700, Sheryl <Sheryl@discussions.microsoft.com> wrote: >Steve can you email me I really need a database created as well and will pay >you the fee. Sheryl Luckily for you, he can't, because he doesn't know your email address. Don't post it here, or even worse spammers than Steve will pick it up. I would recommend that you find someone (perhaps locally) who can help you, rather than paying someone who has habitually and constantl...

Anyway to open a Publisher 2002 file in Publisher 2000?
I need to open this file for a project tomorrow. I have Publisher 2000, but I think the file sent to me was done in Publisher 2002 or 2003? The person who sent it to me is out of town until Thursday, so I can't have them resave it or resend it. Any ideas Thanks! In news:11BBD624-9460-465D-88EE-60230ADB1F33@microsoft.com, buck <create007@yahoo.com> posted: > I need to open this file for a project tomorrow. I have Publisher > 2000, but I think the file sent to me was done in Publisher 2002 or > 2003? The person who sent it to me is out of town until Thursday, so > I ...

OLook Locks up when attempting to delete large file in out box.
Outlook keeps trying to send a file that is way too large. I didn't notice it was so large until after a few days of OL being extremely slow and using up my CPU at 100%. How can I delete this file? I have tried going to the outbox and selecting delete, but it will not delete. Can find the location of the data, but not the file that needs to be deleted. Try the easy fix: Select File, Work Offline, Delete the messages "SNR" wrote: > Outlook keeps trying to send a file that is way too large. I didn't notice > it was so large until after a few days of OL being ext...