Andrew Gaffney wrote:
The above code won't work because it splits on a comma. A lot of the fields contain a comma somewhere within the actual data. If it was easy as that, I would have had this done long ago ;)
-- Andrew Gaffney
Hi Andrew,
Don't count on it not being that easy. Are you using the native capacities of the application to their best. I'm presuming here that a lawyer will have a full M$ Office suite, if they are u8sing the tools at all. You can paste tables from Word docs into Excel, and exoprt as CSV from there. Excel should have a much broader range of data export filters.
It sound, though, like you will have a major job of normalization ahead. I would foresee a bit of hand work in the data design. One interim step you might take, for multivalued fields, is to concatenate them with some nuetral delimiter, such as a semi-colon. This way, as you normalize to break out any given field, you can use the Text::CSV module to get your fields, then split the fields of interest on the semicolons.
If this material is already in an Office format, though, I would definitely recommend that you do as much as possible within Office. There is so much solid built-in functionality there that it wouldn't make sense to low-level something you can do with a macro.
I tried copying from Word and pasting to Excel first. Excel would only let me export as tab delimeted text, which was fine. The problem was the fields with embedded '\r\n' which completely fscked up the output.
-- Andrew Gaffney Network Administrator Skyline Aeronautics, LLC. 636-357-1548
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>