help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] comments in csv data files


From: Nigel Galloway
Subject: Re: [Help-glpk] comments in csv data files
Date: Mon, 17 May 2010 20:33:40 +0400

I might have mentioned the benefits of XML before. You have helpfully pointed 
out that a program can be written in grep to convert csv to XML. After careful 
research I found that Excel can read csv and save it in XML.

How then may your useful comments be added?

One solution is to add the comments and then write a program in grep (or use
the c precompiler to remove them).

We have examined the advantages of modern input and output in XML, then using 
XSLT to convert to the 1970's text based, more human readable (sometimes - I 
have my doubts about MPS for one), formats required by some legacy programs. A 
major advantage is that often someone else has already done it for me!!!!

Let us consider the following problem:

You are looking to create an Excel file by selecting only some of
the Columns from an XML. The columns are not is the correct
sequence for the Excel so they need to be mapped.
You have an XML that contains columns A, B, C, D, E, F, etc.
You only need data from columns B, D, and F.
But in the output Excel file the sequence has to be F, B, and D.

(see attachment for the example file, note it has a comment in it)

To accomplish the task we will use XMLFox Advance that is a useful
XML and XSD schema editor. By using XMLFox Advance you can output
data to several other data format files. The Editor allows you
export XML tables or whole XML to the following data files: TXT;
upload XML into MS SQL Server database, convert into CSV (Comma
Separated Value) file, convert into HTML page, create MS Access
database, upload XML into SQL Server database, convert to PDF, and
create Excel file.

Full details of the above (reproduced without any permission) can be found at:

http://www.xmlfox.com/convert_xml.htm


> ----- Original Message -----
> From: Andrew Makhorin <address@hidden>
> To: address@hidden
> Subject: [Help-glpk] comments in csv data files
> Date: Sun, 16 May 2010 13:36:57 +0400
>
>
> I found that it would be convenient to allow comment lines in csv data
> files read from mathprog models thru the table statement. Unfortunately,
> the RFC document 4180 that specifies the csv format says nothing about
> such a feature.
>
> Probably, a comment line can be indicated by its very first character
> (like in many scripting languages): '#', ';', '*', or may be '%'.
> Another issue is whether to allow comment lines everywhere in the file
> or only in the beginning. The latter seems safer, because the first line
> contains field names which, as a rule, contain no special characters.
>
> Any opinions/suggestions are appreciated. Thanks.
>
> Andrew Makhorin
>
>
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk

>


-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]