SORTING A FILE XML

Hi,
is it possible to sort a XML file without using a XSLT or XSL file??
For example, my XML is:

<A>
    <1>
    <3>
    <4>
    <2>
</A>
<C>
   <2>
   <1>
</C>
<B>
    <3>
    <2>
    <1>
</B>

The result of the sorting method should by:
<A>
    <1>
    <2>
    <3>
    <4>
</A>
<B>
    <1>
    <2>
    <3>
</B>
<C>
   <1>
   <2>
</C>

Can anyone help me ?
Thanks
0
SIU (13)
11/25/2004 3:05:07 PM
dotnet.xml 7266 articles. 0 followers. Follow

8 Replies
579 Views

Similar Articles

[PageSpeed] 8


Siu wrote:


> is it possible to sort a XML file without using a XSLT or XSL file??

Yes, there are other ways to programmatically manipulate XML, DOM 
programming for instance, see System.Xml.XmlDocument. But XSLT has a 
sort instruction while with DOM programming you need to implement that 
yourself.

> For example, my XML is:
> 
> <A>
>     <1>
>     <3>
>     <4>
>     <2>
> </A>
> <C>
>    <2>
>    <1>
> </C>
> <B>
>     <3>
>     <2>
>     <1>
> </B>

That is not XML, you have no root element and element names need to 
start with a letter and not a digit so you need to provide a sample that 
is XML.

> The result of the sorting method should by:
> <A>
>     <1>
>     <2>
>     <3>
>     <4>
> </A>
> <B>
>     <1>
>     <2>
>     <3>
> </B>
> <C>
>    <1>
>    <2>
> </C>

So you want to sort by element names and not element content? Or is
   <1>
supposed to be
   <data>1</data>
?

-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
11/25/2004 3:26:37 PM
Hi Martin,
thanks for answering. You're right... I've written a bat example.... my real 
XML file is like this:

- <APPLICATIONLIST>
    - <APPLICATION APPNAME="ActiveSync">
      - <ICONGROUP SOURCE="ActiveSync.lnk">
          - <DEST TARGET="START" /> 
      </ICONGROUP>
    </APPLICATION>
   - <APPLICATION APPNAME="AutoCAD">
    - <ICONGROUP SOURCE="AutoCAD.lnk">
       <DEST TARGET="START" /> 
     </ICONGROUP>
    </APPLICATION>
  - <APPLICATION APPNAME="Banana">
    - <ICONGROUP SOURCE="Banana.lnk">
       <DEST TARGET="START" /> 
      </ICONGROUP>
    </APPLICATION>
  - <APPLICATION APPNAME="Bridge Workstation">
  </APPLICATION>
<APPLICATIONLIST>

I would like to order my XML file by APPNAME of each APPLICATION node: the 
latter can be also nested into other APPLICATION node, like this:

  - <APPLICATION APPNAME="MicrosoftOffice">
       - <ICONGROUP SOURCE="ActiveSync.lnk">
             - <DEST TARGET="START" /> 
         </ICONGROUP>
       - <APPLICATION APPNAME="Excel"/>
       - <APPLICATION APPNAME="Word"/>
       - <APPLICATION APPNAME="PowerPoint"/>
   </APPLICATION>

Can you help me, please 

"Martin Honnen" wrote:

> 
> 
> Siu wrote:
> 
> 
> > is it possible to sort a XML file without using a XSLT or XSL file??
> 
> Yes, there are other ways to programmatically manipulate XML, DOM 
> programming for instance, see System.Xml.XmlDocument. But XSLT has a 
> sort instruction while with DOM programming you need to implement that 
> yourself.
> 
> > For example, my XML is:
> > 
> > <A>
> >     <1>
> >     <3>
> >     <4>
> >     <2>
> > </A>
> > <C>
> >    <2>
> >    <1>
> > </C>
> > <B>
> >     <3>
> >     <2>
> >     <1>
> > </B>
> 
> That is not XML, you have no root element and element names need to 
> start with a letter and not a digit so you need to provide a sample that 
> is XML.
> 
> > The result of the sorting method should by:
> > <A>
> >     <1>
> >     <2>
> >     <3>
> >     <4>
> > </A>
> > <B>
> >     <1>
> >     <2>
> >     <3>
> > </B>
> > <C>
> >    <1>
> >    <2>
> > </C>
> 
> So you want to sort by element names and not element content? Or is
>    <1>
> supposed to be
>    <data>1</data>
> ?
> 
> -- 
> 
> 	Martin Honnen
> 	http://JavaScript.FAQTs.com/
> 
0
SIU (13)
11/25/2004 4:31:03 PM

Siu wrote:


> my real 
> XML file is like this:
> 
> - <APPLICATIONLIST>
>     - <APPLICATION APPNAME="ActiveSync">
>       - <ICONGROUP SOURCE="ActiveSync.lnk">
>           - <DEST TARGET="START" /> 
>       </ICONGROUP>
>     </APPLICATION>
>    - <APPLICATION APPNAME="AutoCAD">
>     - <ICONGROUP SOURCE="AutoCAD.lnk">
>        <DEST TARGET="START" /> 
>      </ICONGROUP>
>     </APPLICATION>
>   - <APPLICATION APPNAME="Banana">
>     - <ICONGROUP SOURCE="Banana.lnk">
>        <DEST TARGET="START" /> 
>       </ICONGROUP>
>     </APPLICATION>
>   - <APPLICATION APPNAME="Bridge Workstation">
>   </APPLICATION>
> <APPLICATIONLIST>
> 
> I would like to order my XML file by APPNAME of each APPLICATION node: the 
> latter can be also nested into other APPLICATION node, like this:
> 
>   - <APPLICATION APPNAME="MicrosoftOffice">
>        - <ICONGROUP SOURCE="ActiveSync.lnk">
>              - <DEST TARGET="START" /> 
>          </ICONGROUP>
>        - <APPLICATION APPNAME="Excel"/>
>        - <APPLICATION APPNAME="Word"/>
>        - <APPLICATION APPNAME="PowerPoint"/>
>    </APPLICATION>

Here is an XSLT 1.0 stylesheet that sorts that:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   version="1.0">

<xsl:output method="xml" encoding="UTF-8" indent="yes" />

<xsl:template match="@* | node()">
   <xsl:copy>
     <xsl:apply-templates select="@* | node()" />
   </xsl:copy>
</xsl:template>

<xsl:template match="APPLICATIONLIST">
   <xsl:copy>
     <xsl:apply-templates select="APPLICATION">
       <xsl:sort select="@APPNAME" data-type="text" order="ascending"
                 lang="en" case-order="upper-first" />
     </xsl:apply-templates>
   </xsl:copy>
</xsl:template>

<xsl:template match="APPLICATION">
   <xsl:copy>
     <xsl:apply-templates select="@*" />
     <xsl:apply-templates select="ICONGROUP" />
     <xsl:apply-templates select="APPLICATION">
       <xsl:sort select="@APPNAME" data-type="text" order="ascending"
                 lang="en" case-order="upper-first" />
     </xsl:apply-templates>
   </xsl:copy>
</xsl:template>

</xsl:stylesheet>

It is easily possible with .NET to apply the transformation to the 
source input, see the XslTransform class in the .NET documentation.

-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
11/25/2004 5:36:17 PM
Hi Martin,
your suggestion is perfect, thank you:)

I've have another little question: I've used the XslTransform class in order 
to sort that xml file into another new xml file, and it works, but the 
problem is that the method or the xslt file writes into the output file as 
first row this:

 <?xml version="1.0" encoding="utf-8" ?> 

How can I avoid writing this row?

Thank you again

"Martin Honnen" wrote:

> 
> 
> Siu wrote:
> 
> 
> > my real 
> > XML file is like this:
> > 
> > - <APPLICATIONLIST>
> >     - <APPLICATION APPNAME="ActiveSync">
> >       - <ICONGROUP SOURCE="ActiveSync.lnk">
> >           - <DEST TARGET="START" /> 
> >       </ICONGROUP>
> >     </APPLICATION>
> >    - <APPLICATION APPNAME="AutoCAD">
> >     - <ICONGROUP SOURCE="AutoCAD.lnk">
> >        <DEST TARGET="START" /> 
> >      </ICONGROUP>
> >     </APPLICATION>
> >   - <APPLICATION APPNAME="Banana">
> >     - <ICONGROUP SOURCE="Banana.lnk">
> >        <DEST TARGET="START" /> 
> >       </ICONGROUP>
> >     </APPLICATION>
> >   - <APPLICATION APPNAME="Bridge Workstation">
> >   </APPLICATION>
> > <APPLICATIONLIST>
> > 
> > I would like to order my XML file by APPNAME of each APPLICATION node: the 
> > latter can be also nested into other APPLICATION node, like this:
> > 
> >   - <APPLICATION APPNAME="MicrosoftOffice">
> >        - <ICONGROUP SOURCE="ActiveSync.lnk">
> >              - <DEST TARGET="START" /> 
> >          </ICONGROUP>
> >        - <APPLICATION APPNAME="Excel"/>
> >        - <APPLICATION APPNAME="Word"/>
> >        - <APPLICATION APPNAME="PowerPoint"/>
> >    </APPLICATION>
> 
> Here is an XSLT 1.0 stylesheet that sorts that:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet
>    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>    version="1.0">
> 
> <xsl:output method="xml" encoding="UTF-8" indent="yes" />
> 
> <xsl:template match="@* | node()">
>    <xsl:copy>
>      <xsl:apply-templates select="@* | node()" />
>    </xsl:copy>
> </xsl:template>
> 
> <xsl:template match="APPLICATIONLIST">
>    <xsl:copy>
>      <xsl:apply-templates select="APPLICATION">
>        <xsl:sort select="@APPNAME" data-type="text" order="ascending"
>                  lang="en" case-order="upper-first" />
>      </xsl:apply-templates>
>    </xsl:copy>
> </xsl:template>
> 
> <xsl:template match="APPLICATION">
>    <xsl:copy>
>      <xsl:apply-templates select="@*" />
>      <xsl:apply-templates select="ICONGROUP" />
>      <xsl:apply-templates select="APPLICATION">
>        <xsl:sort select="@APPNAME" data-type="text" order="ascending"
>                  lang="en" case-order="upper-first" />
>      </xsl:apply-templates>
>    </xsl:copy>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> It is easily possible with .NET to apply the transformation to the 
> source input, see the XslTransform class in the .NET documentation.
> 
> -- 
> 
> 	Martin Honnen
> 	http://JavaScript.FAQTs.com/
> 
0
SIU (13)
11/26/2004 10:45:02 AM
Hi Martin,
your suggestion is perfect, thank you :)

I've another question: I've used the method XslTransform in order to sort my 
xml file into another xml output file: in the latter appears as first 
row/sentence this:

 <?xml version="1.0" encoding="utf-8" ?> 

How can I avoid writing this first row/sentence? is it possible?

Thank you again :)


"Siu" wrote:

> Hi Martin,
> your suggestion is perfect, thank you:)
> 
> I've have another little question: I've used the XslTransform class in order 
> to sort that xml file into another new xml file, and it works, but the 
> problem is that the method or the xslt file writes into the output file as 
> first row this:
> 
>  <?xml version="1.0" encoding="utf-8" ?> 
> 
> How can I avoid writing this row?
> 
> Thank you again
> 
> "Martin Honnen" wrote:
> 
> > 
> > 
> > Siu wrote:
> > 
> > 
> > > my real 
> > > XML file is like this:
> > > 
> > > - <APPLICATIONLIST>
> > >     - <APPLICATION APPNAME="ActiveSync">
> > >       - <ICONGROUP SOURCE="ActiveSync.lnk">
> > >           - <DEST TARGET="START" /> 
> > >       </ICONGROUP>
> > >     </APPLICATION>
> > >    - <APPLICATION APPNAME="AutoCAD">
> > >     - <ICONGROUP SOURCE="AutoCAD.lnk">
> > >        <DEST TARGET="START" /> 
> > >      </ICONGROUP>
> > >     </APPLICATION>
> > >   - <APPLICATION APPNAME="Banana">
> > >     - <ICONGROUP SOURCE="Banana.lnk">
> > >        <DEST TARGET="START" /> 
> > >       </ICONGROUP>
> > >     </APPLICATION>
> > >   - <APPLICATION APPNAME="Bridge Workstation">
> > >   </APPLICATION>
> > > <APPLICATIONLIST>
> > > 
> > > I would like to order my XML file by APPNAME of each APPLICATION node: the 
> > > latter can be also nested into other APPLICATION node, like this:
> > > 
> > >   - <APPLICATION APPNAME="MicrosoftOffice">
> > >        - <ICONGROUP SOURCE="ActiveSync.lnk">
> > >              - <DEST TARGET="START" /> 
> > >          </ICONGROUP>
> > >        - <APPLICATION APPNAME="Excel"/>
> > >        - <APPLICATION APPNAME="Word"/>
> > >        - <APPLICATION APPNAME="PowerPoint"/>
> > >    </APPLICATION>
> > 
> > Here is an XSLT 1.0 stylesheet that sorts that:
> > 
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsl:stylesheet
> >    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >    version="1.0">
> > 
> > <xsl:output method="xml" encoding="UTF-8" indent="yes" />
> > 
> > <xsl:template match="@* | node()">
> >    <xsl:copy>
> >      <xsl:apply-templates select="@* | node()" />
> >    </xsl:copy>
> > </xsl:template>
> > 
> > <xsl:template match="APPLICATIONLIST">
> >    <xsl:copy>
> >      <xsl:apply-templates select="APPLICATION">
> >        <xsl:sort select="@APPNAME" data-type="text" order="ascending"
> >                  lang="en" case-order="upper-first" />
> >      </xsl:apply-templates>
> >    </xsl:copy>
> > </xsl:template>
> > 
> > <xsl:template match="APPLICATION">
> >    <xsl:copy>
> >      <xsl:apply-templates select="@*" />
> >      <xsl:apply-templates select="ICONGROUP" />
> >      <xsl:apply-templates select="APPLICATION">
> >        <xsl:sort select="@APPNAME" data-type="text" order="ascending"
> >                  lang="en" case-order="upper-first" />
> >      </xsl:apply-templates>
> >    </xsl:copy>
> > </xsl:template>
> > 
> > </xsl:stylesheet>
> > 
> > It is easily possible with .NET to apply the transformation to the 
> > source input, see the XslTransform class in the .NET documentation.
> > 
> > -- 
> > 
> > 	Martin Honnen
> > 	http://JavaScript.FAQTs.com/
> > 
0
SIU (13)
11/26/2004 10:47:06 AM
Hi Martin,
your suggestion is perfect, thank you :)

I've another question: I've used the method XslTransform in order to sort my 
xml file into another xml output file: in the latter appears as first 
row/sentence this:

 <?xml version="1.0" encoding="utf-8" ?> 

How can I avoid writing this first row/sentence? is it possible?

Thank you again :)

"Martin Honnen" wrote:

> 
> 
> Siu wrote:
> 
> 
> > my real 
> > XML file is like this:
> > 
> > - <APPLICATIONLIST>
> >     - <APPLICATION APPNAME="ActiveSync">
> >       - <ICONGROUP SOURCE="ActiveSync.lnk">
> >           - <DEST TARGET="START" /> 
> >       </ICONGROUP>
> >     </APPLICATION>
> >    - <APPLICATION APPNAME="AutoCAD">
> >     - <ICONGROUP SOURCE="AutoCAD.lnk">
> >        <DEST TARGET="START" /> 
> >      </ICONGROUP>
> >     </APPLICATION>
> >   - <APPLICATION APPNAME="Banana">
> >     - <ICONGROUP SOURCE="Banana.lnk">
> >        <DEST TARGET="START" /> 
> >       </ICONGROUP>
> >     </APPLICATION>
> >   - <APPLICATION APPNAME="Bridge Workstation">
> >   </APPLICATION>
> > <APPLICATIONLIST>
> > 
> > I would like to order my XML file by APPNAME of each APPLICATION node: the 
> > latter can be also nested into other APPLICATION node, like this:
> > 
> >   - <APPLICATION APPNAME="MicrosoftOffice">
> >        - <ICONGROUP SOURCE="ActiveSync.lnk">
> >              - <DEST TARGET="START" /> 
> >          </ICONGROUP>
> >        - <APPLICATION APPNAME="Excel"/>
> >        - <APPLICATION APPNAME="Word"/>
> >        - <APPLICATION APPNAME="PowerPoint"/>
> >    </APPLICATION>
> 
> Here is an XSLT 1.0 stylesheet that sorts that:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet
>    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>    version="1.0">
> 
> <xsl:output method="xml" encoding="UTF-8" indent="yes" />
> 
> <xsl:template match="@* | node()">
>    <xsl:copy>
>      <xsl:apply-templates select="@* | node()" />
>    </xsl:copy>
> </xsl:template>
> 
> <xsl:template match="APPLICATIONLIST">
>    <xsl:copy>
>      <xsl:apply-templates select="APPLICATION">
>        <xsl:sort select="@APPNAME" data-type="text" order="ascending"
>                  lang="en" case-order="upper-first" />
>      </xsl:apply-templates>
>    </xsl:copy>
> </xsl:template>
> 
> <xsl:template match="APPLICATION">
>    <xsl:copy>
>      <xsl:apply-templates select="@*" />
>      <xsl:apply-templates select="ICONGROUP" />
>      <xsl:apply-templates select="APPLICATION">
>        <xsl:sort select="@APPNAME" data-type="text" order="ascending"
>                  lang="en" case-order="upper-first" />
>      </xsl:apply-templates>
>    </xsl:copy>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> It is easily possible with .NET to apply the transformation to the 
> source input, see the XslTransform class in the .NET documentation.
> 
> -- 
> 
> 	Martin Honnen
> 	http://JavaScript.FAQTs.com/
> 
0
SIU (13)
11/26/2004 10:47:09 AM

Siu wrote:


> I've have another little question: I've used the XslTransform class in order 
> to sort that xml file into another new xml file, and it works, but the 
> problem is that the method or the xslt file writes into the output file as 
> first row this:
> 
>  <?xml version="1.0" encoding="utf-8" ?> 
> 
> How can I avoid writing this row?

It is not a row, it is the XML declaration that usually doesn't do any 
harm in an XML file.
If you want to avoid it you can do so from XSLT with

<xsl:output method="xml" encoding="UTF-8" indent="yes"
             omit-xml-declaration="yes" />


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
11/26/2004 11:53:20 AM
Thank you very much, Martin ;)

"Martin Honnen" wrote:

> 
> 
> Siu wrote:
> 
> 
> > I've have another little question: I've used the XslTransform class in order 
> > to sort that xml file into another new xml file, and it works, but the 
> > problem is that the method or the xslt file writes into the output file as 
> > first row this:
> > 
> >  <?xml version="1.0" encoding="utf-8" ?> 
> > 
> > How can I avoid writing this row?
> 
> It is not a row, it is the XML declaration that usually doesn't do any 
> harm in an XML file.
> If you want to avoid it you can do so from XSLT with
> 
> <xsl:output method="xml" encoding="UTF-8" indent="yes"
>              omit-xml-declaration="yes" />
> 
> 
> -- 
> 
> 	Martin Honnen
> 	http://JavaScript.FAQTs.com/
> 
0
SIU (13)
11/26/2004 12:39:04 PM
Reply:

Similar Artilces:

Where's the Sort by New Message option?
Not sure when the layout of the newsgroups changed but I can't seem to find the ability to sort by new message in a thread instead of sorting by just the original thread date. That was hugely helpful as I could follow along and see what threads were still active. If you're gonna hang around in the newsgroups (any newsgroups), you may want to start using a newsreader. Microsoft Outlook Express can do it for you. Saved from a previous post: You may want to connect to the ms newsserver directly: If you have Outlook Express installed, try clicking on these links (or copy and paste i...

File Link
I have a problem related File links. I cannot get right. Can some one tell me how to write these. I have 3 files - Test01, Test 02, Test 03 Test01 linked to Test02 and test02 linked to Test03. All the files in the network drive. Instead of opening all the files, some users opening the file test01 only and are making updates, So I am getting the incorrect results in test03. Is there anyway to arrest this? Regards, Krishnan ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.Excel...

Sorting
Hi, is it possible to use variable for sorting? Something like: declare @sort varchar(10) SET @sort='column1 DESC' SELECT ROW_NUMBER() OVER (ORDER BY @sort)AS rowId, * FROM table Is dynamic SQL only option? Thank you, Simon On 15/04/2010 11:28, simon wrote: > Hi, > > is it possible to use variable for sorting? > > Something like: > > declare @sort varchar(10) > SET @sort='column1 DESC' > > SELECT ROW_NUMBER() OVER (ORDER BY @sort)AS rowId, * FROM table > > Is dynamic SQL only option? You can use CASE to he...

How to sort account list?
I'm using MS Money 2004 Small Business. In the account list, my accounts are catagorized by and in this order: - bank accounts - credit accounts - investment accounts - loans and liabilities - asset accounts TOTAL BALANCE In the above view, I cannot easily determine totals for assets and liabilities. The following view does this. - bank accounts - investment accounts - asset accounts SUBTOTAL -loans and liabilities SUBTOTAL TOTAL BALANCE How do I get the above view? Thanks, Brett I don't use Small Business. But you can run a Net Worth report to get total assets and ...

Row names will not move with sort
Each row in my summary table in Sheet1 is hyperlinked to a corresponding table in Sheet2 with additional details. I need to move the rows in my summary table (Sheet1) and preserve the links to and from the details tables (Sheet2). I found that I can move rows in Sheet1 with cut & insert and the hyperlinks are maintained. I can travel from a row in summary table (Sheet1) to details table (Sheet2) and back, even after the corresponding row (Sheet1) was moved. But if I sort the rows in Sheet1 the links from Sheet2 back to corresponding rows in Sheet1 lead to presorted locations. Apparen...

pst file to Lotus Notes
We will be connecting to our Corporate office over a WAN. We are currently using Exchange Server locally. The Corporate office is using Lotus Notes. We will be using new computers with Lotus Notes installed, Outlook not installed. How can we incorporate our outlook pst file into Lotus Notes? If there is a way to do this, are there instructions available? Thank you for your help in advance! Candace Sparks ...

Error converting 2003 to 2007
I have been trying everything to convert a MS-ACCESS 2003 file to 2007. Everytime I try I get the error Could not use 'C:\DB.mdb'; file already in use. I have tried re-booting. I found this article that I thought would help: http://support.microsoft.com/default.aspx/kb/289681 This says it is caused by user rights on the folder. This can't be the problem. I have full access. I would appreciate any help. -- Dave It may be a misleading message telling you that you are trying to use the same filename as the original file. -- Arvin Meyer, MCP, MVP h...

PUB File
My associate created a document (2 column) and sent it to me for final touch ups, along with a PDF representation of the file. When I open the PUB, the single page document now spans two pages - unlike the PDF. We are using a simple font - available on both PCs. When I've made the text fit on a single page, print to PDF, and return PUB and PDF file to him, he sees the PUB with extra white space in the lower left right - which I guess I expected based on the way the file spilled to two pages for me, and not for him. Is there something I can look at to better understand what could be ...

sorts not sorting
OK- Thanks to everyones help I now i have a list i can work with... but there are a few problems.... the zips are all 5 digit and now i have to sort them... the problem is, THEY WONT SORT CORRECTLY!!!!!!! The numbers are not in order... some are but a lot are not... is there anyway to fix this???? i need to sort them by zip code but cant seem to get them to do it correctly.. any ideas??? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ You are going to be far better of...

import- number- sort?
I imported this data into a spread sheet- I tried to format it to number, but when I sort it- I get : 37.08 4.33 4.79 4.8 42.56 5.94 Whats up with this? Thanks Brent Hi Brent, Install the TrimAll macro, select the column and invoke the macro from Alt+F8 http://www.mvps.org/dmcritchie/excel/join.htm#trimall Directions to install and use a macro at http://www.mvps.org/dmcritchie/excel/getstarted.htm#havemacro I expect that you have spaces or CHAR(128) "Required Blank" characters in you data you can check is =LEN(A1) --- HTH, David...

Receiving excel files
Whenever I receive an Excel file through email and try to open it, I receive the error message 'file format is not valid'. These are all .xls files. Any suggestions on how to fix this problem ??? Doug What versions of XL? (if you have versions before 97 and you are sent 97 or above, the file formats are different) -- HTH Nick Hodge Southampton, England nick_hodge@btinternet.com "Doug" <dwire90@hotmail.com> wrote in message news:01ae01c3903a$31837eb0$a301280a@phx.gbl... > Whenever I receive an Excel file through email and try to > open it, I receive the...

Form elements into xml
Hi, I've been asked to write a generic function/class to scan posted forms and generate a xml document as follow: 1. page1.aspx (or asp) posts to process.aspx 2. process.aspx calls a function that scans the form(s) and generates a xml from elements and values(entered by user) of the form. I thought it might be better to ask you guys and you may know a function or class in the framework that already does this and put me on the right track. Thanks for you time Regards Mehdi ...

Customising Crystal Reports + File Location
Hello, We have installed Crystal 9 with the CRM Enhancement pack on top of it. What i was wondering is there a list where i can know which report in crm is for what? All i see is lots of folders with funny names like 9e4361ec44fd1190.rpt is there anyway you can get logical names from? Should you create your own report where would you save in in CRM to be able to access in via the crm menu? Thanks and Regards -- Fakhruddin Zavery Sr. Systems Analyst / Programmer CATS Tanzania Ltd. NIC Life House 4th Floor P. O. Box 2569, Dar es Salaam, Tanzania Tel. +255-22 2137915, 2112631 Fax +255-22 ...

sorting macro #3
I need to sort on 8 cells in a row and on 1500+rows. I can do it one at a time but I know there must be an easier way. Can ANYONE HELP? C3:J3 I need these cells sorted and then down to C1532:J1532 I did create a macro to sort after I selected them but still one at a time. Does it have to be a macro? I can edit a macro but don't really know how to program them. Yes, it has to be a macro. The following should do it. This macro loops through all the entries in Column C, and in each row it sorts the values in Columns C:J. HTH Otto Sub SortRows() Dim rColC As Range Dim i As...

Open and Work Files
Hi, A very basic questions.... What data the "open" and "Work" files store? DO they store only the posted, Unposted, Applied or historical information? Does the storage differs based on the modules? Regards, Manish Agarwal WORK: Unposted data in 10000 series tables OPEN: Posted data in 20000 series tables HISTORY: Historical data in 30000 series tables "Pavan" wrote: > Hi, > > A very basic questions.... > > What data the "open" and "Work" files store? DO they store only the posted, > Unposted, Applied or historical ...

Can we sort a form and also be able to enter new records.
Hi, It is possible to sort the data on a form and also be able to enter new and edit the existing records in it. Cheers! On Tue, 15 Jan 2008 15:41:16 -0800 (PST), Rex wrote: > Hi, > > It is possible to sort the data on a form and also be able to enter > new and edit the existing records in it. > > Cheers! I assume you mean "Is it". The form sort order has nothing to do with editing or adding new records, so the answer is yes. If you cannot edit or add new records, make sure the form's record source, if it is a query, is updateable. Some queries are not. O...

File Access
I just submitted the following to the MS Tech Support Page. After some editing, I will try to get it published in the local editorial columns. Do with it as you please. -------------------- Microsoft should be embarrassed and apologize to every consumer that paid for Microsoft Money. One of your servers has a problem and we can't even work with our files offline. Bill Gates should publicly apologize for frauding the public with his promoting Passport,net as a secure reliable service. I have been a supporter of Microsoft products when Apple commanded the market. I have argued with ...

Looking for info/recommendations on server file undelete software
I am a Windows system admin for a city government. We have about 5,000 users, and about 120 Windows 2003 servers. I have been tasked to look into file undelete software that would allow our users to recover deleted files from network shares on some of our larger file servers. I know about the Diskkeeper Network Undelete software, and had used an older version several years ago, but since we're a government agency, we need to attempt to evaluate multiple solutions. The problem is that I'm having trouble finding any other similar software. I've done various inte...

enumerating file on a directory
hi, How can i enumerate files on a directory based on a filter like "*.h" and store the result on an array on VC++. tnx, hope you guys can help. I choose Polesoft Lockspam to fight spam, and you? http://www.polesoft.com/refer.html Look For CFileFind Class if working in MFC or FindFirstFile FindNextFile or FindClose if you project based on Win32 -- cheers, Alok Gupta Visit me at http://alok.bizhat.com "lawrence" <las@cybees.com> wrote in message news:#NvsWCRXFHA.2796@TK2MSFTNGP09.phx.gbl... > hi, How can i enumerate files on a directory based on a filter...

Sorting checking register
How do i sort my check register in Money 2004 Deluxe so that uncleared transactions appear below cleared transactions? In Quicken i could click on the column to provide that sort. In microsoft.public.money, Dean wrote: >How do i sort my check register in Money 2004 Deluxe so >that uncleared transactions appear below cleared >transactions? In Quicken i could click on the column to >provide that sort. You don't. Available choices are chosen by clicking View at the top of the register. ...

Changing the location of a file through
Hi there, I want to be able to move a file through the use of a command button i vb. The idea would be that after a file was approved it would be moved t the approved folder The form would have a text box with the file location in, below thi ,there would be two command buttons, one approve and one reject. Therefore the file which is waiting to be accepted has the locatio C:\sch and when a comand button (approve) is pressed it moves t C:\sch1, if though it is rejected then it goes to c:\sch2 Is this possible? -- Message posted from http://www.ExcelForum.com Steve, Const sFolder As St...

Open existing file
I recently got a new computer and want to move my Money files to that computer. This is what I have done so far: - installed current version of Money 2003 on new PC - copied current Money file from old PC to CD - copied current Money file from CD to new PC - am able to perform File, Open and it appears to want to open existing file However, my data does not appear anywhere - accounts, payees, reports, etc. Its like it hasn't opened it at all. How can I get it to open an existing file that the new PC has never seen before? Thx. Double-click on the .MNY file you copied over via CD...

XML query
Hi I am new to using XML, and have a bit of an issue. How do I define how the XML file looks when I export a query from Access? On Sep 12, 4:50 pm, rmorri...@davislangdon.com.au wrote: > Hi I am new to using XML, and have a bit of an issue. How do I define > how the XML file looks when I export a query from Access? XML is a markup language: http://www.w3.org/TR/2006/REC-xml11-20060816/#sec-origin-goals That means, it is a plain text file, it uses tags. When you export a query from Access 2003 to XML, several files with different purpose can be generated. 1. A file with .xml exten...

Is there a universal file savings format?
I am upgrading to Win 7. Therefore I am looking for the "best" word processing program, such as MS Word 2002 (which I am currently using), or MS Word 2007, or Open Office. Word 2002 is very fast and works fine. It saves files as .doc . I played with Word 2007 and found it very bewildering and totally different from Word 2002 (More eye candy). It saves files as docx. I have not tried Open Office but I understand it saves files in a different format yet: .sxw Why did MS break with the ancient .doc suffix and why did they invent ..docx, which is not readable by an...

using addrress books to sort incoming mail
I use address books to sort incoming mail. An odd thing: depending on how the sender's name comes across, it doesn't get caught by the filter (amd moved to the "Family Mail" Folder I have set up. for example: my mom and dad's email (from momanddad@somedomain.com) comes as from that address. However, in my contacts, they are listed by their names: John and Mary Smith, with momanddad@somedomain.com as their email address and John and Mary Smith as the display name. What have I done wrong? TIA 1. The big ONE - failed to post your version of Outlook. Rules operate at ...