POV-Ray : Newsgroups : povray.off-topic : A solution in search of a problem Server Time
28 Jul 2024 22:26:07 EDT (-0400)
  A solution in search of a problem (Message 11 to 12 of 12)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Stephen
Subject: Re: A solution in search of a problem
Date: 26 Jun 2013 15:54:46
Message: <51cb4706$1@news.povray.org>
On 26/06/2013 8:36 PM, Orchid Win7 v1 wrote:
> It's easy enough to open Excel programmatically; what isn't obvious is
> how to make it run code once it opens up. (Indeed, these days that tends
> to be exactly the sort of thing Excel blocks to prevent macro viruses...)

http://office.microsoft.com/en-gb/excel-help/running-a-macro-when-excel-starts-HA001034628.aspx


-- 
Regards
     Stephen


Post a reply to this message

From: scott
Subject: Re: A solution in search of a problem
Date: 27 Jun 2013 03:58:51
Message: <51cbf0bb$1@news.povray.org>
> Actually this is Haskell. But if it isn't too difficult, I could write
> some C# to actually graph the data once it's in a CSV file...

Seems a bit of an overkill if you don't already have a C# app running.

If you don't mind it being in Excel then that would be the easiest way 
to go, as already discussed here. Haskell writes CSV to known file, 
fires up a "template" Excel file that has an onload macro to import the 
csv. You might also want to reset the filename so the user doesn't 
accidentally overwrite your template.

If you don't want to use macros then you could use COM to open up the 
Excel file and then put the data directly into the Excel file (rather 
than writing it to a csv first). Don't know if this is possible in 
Haskell, in C# something like this will work:

Excel.Application app = new Excel.Application();
app.Workbooks.Open(@"C:\tem### [at] exls")
app.Cells[5,5] = 500
...


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.