warren- washington, dc wrote:
[Quoted Text] > Our office uses this hideous report generator that always appends a > report header on the first page, a total column and a National Total > at the very end > of comma-delimited files. The worst part is the Totals are almost > invariably wrong because the users don't apply them correctly. > > I'd like to apply an XML schema to the CSV files so I can either strip > or > validate the totals. I'm admittedley new at this, so definitely tell > me if > I'm on the wrong path. I'm sure I can write simple VBA code to do it, > but I was hoping there was something already available.
Schemas are for describing the construction of XML files, so they are not the right tool for describing CSV files, because CSV files are not XML files. But you could convert or import the CSV into an XML environment (in effect turning it into XML) and then apply a Schema to check the validity of the file (subject to the limitations of Schemas), or write a program in XSLT or something else which would check or strip the totals.
///Peter -- XML FAQ: http://xml.silmaril.ie/
|