
On Fri, Jun 17, 2011 at 2:37 AM, Henning Thielemann < lemming@henning-thielemann.de> wrote:
On Thu, 16 Jun 2011, Felipe Almeida Lessa wrote:
[1] http://hackage.haskell.org/**package/bytestring-csvhttp://hackage.haskell.org/package/bytestring-csv
[2] http://hackage.haskell.org/**package/csv-enumeratorhttp://hackage.haskell.org/package/csv-enumerator [3] http://hackage.haskell.org/**package/spreadsheethttp://hackage.haskell.org/package/spreadsheet [4] http://hackage.haskell.org/**package/csvhttp://hackage.haskell.org/package/csv [5] http://hackage.haskell.org/**package/ssvhttp://hackage.haskell.org/package/ssv
I have updated http://www.haskell.org/**haskellwiki/Spreadsheethttp://www.haskell.org/haskellwiki/Spreadsheet
=== I am trying Data.Spreadseet.fromStringSimple , which is: fromString :: Charhttp://hackage.haskell.org/packages/archive/base/4.3.1.0/doc/html/Data-Char....-> Charhttp://hackage.haskell.org/packages/archive/base/4.3.1.0/doc/html/Data-Char....-> Stringhttp://hackage.haskell.org/packages/archive/base/4.3.1.0/doc/html/Data-Char....-> Exceptionalhttp://hackage.haskell.org/packages/archive/explicit-exception/0.1.6/doc/htm...UserMessage Thttp://hackage.haskell.org/packages/archive/spreadsheet/0.1.1/doc/html/Data-... Sourcehttp://hackage.haskell.org/packages/archive/spreadsheet/0.1.1/doc/html/src/D... fromString qm sep text parses text into a spreadsheet, using the quotation character qm and the separator character sep. fromStringSimple :: Charhttp://hackage.haskell.org/packages/archive/base/4.3.1.0/doc/html/Data-Char....-> Charhttp://hackage.haskell.org/packages/archive/base/4.3.1.0/doc/html/Data-Char....-> Stringhttp://hackage.haskell.org/packages/archive/base/4.3.1.0/doc/html/Data-Char....-> Thttp://hackage.haskell.org/packages/archive/spreadsheet/0.1.1/doc/html/Data-... === Here is my test where quotation mark is a quote (") and separator is a comma (,): t1 = fromStringSimple '"' ',' tMsg tMsg = "REP-RPB1.domain1.systemhost.net,Microsoft.Windows.Computer: REP-RPB1.domain1.systemhost.net,- System Uptime > 30 Days,UIGeneratedMonitor3a4ca3359ec34015bee55fd7942836d8,2,Custom,10/17/2009 8:48:38 AM" === As a result I get: [["*** Exception: dequoteSimple: string does not end with a quotation mark === Question: In this particular line I have no quotation mark, but in other lines I may have quoted text fields, separated by commas (,) and also with commas *iside* quoted fields . What parameters should I pass to 'fromStringSimple' so it worked in both cases: 1) for lines with quotation marks and 2) for lines without quotation marks? Thanks!