[softwarelist] Re: Export to CSV?

  • From: Gavin Crawford <gav@xxxxxxxxxxxxxx>
  • To: <davidpilling@xxxxxxxxxxxxx>
  • Date: Thu, 28 Feb 2013 10:50:30 GMT

In message <e893fc2353.ewen@xxxxxxxxxxxxxxxxxxxxx>
          Ewen Pring <Ewen_Pring@xxxxxxxxxxxxx> wrote:

> David Pilling <flist@xxxxxxxxxxxxxxxxxxx> wrote on 25 Feb 2013:

>> On 25 Feb 2013, at 08:24, Ewen Pring <Ewen_Pring@xxxxxxxxxxxxx> wrote:

>>> Has anybody written an applet to export Ovation Pro stories from a
>>> document as a CSV file?

>> I think I'd save the whole document as DDL and then parse out (with
>> another piece of code), the details I wanted.

>> I suppose if I had got around to adding the script functions to allow
>> the caret to be stepped around a document, then that plus saving the
>> contents of text frames would be another way.

>> I'm not sure how your stories with newlines etc. will play with CSV,
>> which usually has elements separated by commas or tab characters, with
>> records split by newlines. It would work if you escaped formatting,
>> like the C language convention of (slash) n for new line etc.

> Thanks for the suggestions to look at exported DDL, I will
> investigate. It is a shame it can't be done by writing an applet,
> though.

It can be done via an applet. The applet would use the function 
savedocumentastype() to save the document as DDL to a particular 
location, then it could run the processing program using 
osclis("WimpTask ...") or something similar, passing the path of the 
saved DDL file.

The applet could even set up a button or key macro to start the whole 
process off with a single the click of the mouse, or a key press. If 
there are hundreds of documents to convert I'd even consider writing 
the applet to start the process when it gets the event that a document 
has been opened. After it has saved the DDL and called the processing 
task, and got back control it could then close the document again. 
That way you'd only have to double-click each document in turn to 
process them. Oh, and just deactivate the applet when they are all 
converted.

Gavin.

To unsubscribe or subscribe goto: //www.freelists.org/list/davidpilling

Other related posts: