POV-Ray : Newsgroups : povray.off-topic : Using Excel as a 3D engine Server Time
11 Oct 2024 01:22:46 EDT (-0400)
  Using Excel as a 3D engine (Message 26 to 35 of 45)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Invisible
Subject: Re: Using Excel as a 3D engine
Date: 12 Mar 2008 08:50:44
Message: <47d7dfb4$1@news.povray.org>
scott wrote:
>> Not because the algorithm is hard, but because I'd have to figure out 
>> how to access the cells of the spreadsheet...)
> 
> Oh my God.

I know...

What can I say? VB isn't exactly the easiest programming language ever. 
And this stuff isn't really documented anywhere. (Sure, there's an 
online help system that will tell you what function X does. But if you 
don't know the name of the function you need... that's not much help.)

Now you see why it took me several hours to write a VB macro that puts 
today's date into a particular cell?

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Invisible
Subject: Re: Using Excel as a 3D engine
Date: 12 Mar 2008 08:52:09
Message: <47d7e009$1@news.povray.org>
>> I tend to use Excel as a function plotter - and it's annoying that things 
>> like an FFT are so hard to do.
> 
> The built-in FFT in Excel doesn't work?

Excell has an FFT? Since when? (Or is it in one of the non-default add-ins?)

> In any case, accessing cells with VBA is basic. Just start recording a macro 
> and put something in a cell to see how it's done.

I didn't realise that uses VB. Oh, wait, I'm thinking about Access...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: scott
Subject: Re: Using Excel as a 3D engine
Date: 12 Mar 2008 09:09:16
Message: <47d7e40c$1@news.povray.org>
> And this stuff isn't really documented anywhere.

Rubbish!

Try looking up "range" or "cells" or "worksheet" in the object browser and 
reading the help.  It even gives examples, like (these are from the help on 
the "range" keyword, the others are similar):

Worksheets("Sheet1").Range("A5").Value = 
Worksheets("Sheet1").Range("A1").Value

Worksheets("Sheet1").Activate
Range("A1:H8").Formula = "=Rand()"    'Range is on the active sheet

Worksheets(1).Cells(1, 1).Value = 24

ActiveSheet.Cells(2, 1).Formula = "=Sum(B1:B5)"

How could it be any more clear what to do?  Or, as Gilles said, record a 
macro and then look at the code (and the help related to the code 
generated) - a nice trick for learning how to do lots of things in Excel 
(like creating charts, changing borders, sorting etc).


Post a reply to this message

From: Gilles Tran
Subject: Re: Using Excel as a 3D engine
Date: 12 Mar 2008 09:31:03
Message: <47d7e927$1@news.povray.org>

47d7e009$1@news.povray.org...
>>> I tend to use Excel as a function plotter - and it's annoying that 
>>> things like an FFT are so hard to do.
>>
>> The built-in FFT in Excel doesn't work?
>
> Excell has an FFT? Since when? (Or is it in one of the non-default 
> add-ins?)

It's in the Analysis Toolpak which is not turned on by default (but just a 
checkbox away).
http://www.maxim-ic.com/appnotes.cfm/an_pk/3292

It's been there for years I believe (the Analysis Toolpak has been there 
since Excel 95 at least, I'm not sure about FFT itself).

> I didn't realise that uses VB. Oh, wait, I'm thinking about Access...

I don't understand what you're saying... The entire Office suite uses VBA. 
Actually that's one big selling point of Office (for businesses): one can 
automate all the Office applications using the same language and have them 
interact with each other.

G.

-- 
*****************************
http://www.oyonale.com
*****************************
- Graphic experiments
- POV-Ray, Cinema 4D and Poser computer images
- Posters


Post a reply to this message

From: Invisible
Subject: Re: Using Excel as a 3D engine
Date: 12 Mar 2008 09:38:34
Message: <47d7eaea$1@news.povray.org>
>> Excell has an FFT? Since when? (Or is it in one of the non-default 
>> add-ins?)
> 
> It's in the Analysis Toolpak which is not turned on by default (but just a 
> checkbox away).

Ah, right. I don't think I have that installed... (But as you say, 
that's not hard to fix.)

I hope it's less clunky than that hacked-in complex number "support" 
Excell has though.

>> I didn't realise that uses VB. Oh, wait, I'm thinking about Access...
> 
> I don't understand what you're saying... The entire Office suite uses VBA.

Yes. But Access has an additional "macro language" that only Access 
uses. By default it seems to record macros with that.

> Actually that's one big selling point of Office (for businesses): one can 
> automate all the Office applications using the same language and have them 
> interact with each other.

Heh. I'm *so* not trying that... ;-)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Invisible
Subject: Re: Using Excel as a 3D engine
Date: 12 Mar 2008 09:41:20
Message: <47d7eb90$1@news.povray.org>
scott wrote:
>> And this stuff isn't really documented anywhere.
> 
> Rubbish!
> 
> Try looking up "range" or "cells" or "worksheet" in the object browser 
> and reading the help.

What is the "object browser"?

> Worksheets(1).Cells(1, 1).Value = 24
> 
> ActiveSheet.Cells(2, 1).Formula = "=Sum(B1:B5)"
> 
> How could it be any more clear what to do?

That seems reasonably clear.

Now, if you call a macro with a cell range as its argument, how does 
that work?

> Or, as Gilles said, record a 
> macro and then look at the code (and the help related to the code 
> generated) - a nice trick for learning how to do lots of things in Excel 
> (like creating charts, changing borders, sorting etc).

I'm still at the level of not really knowing how to work the VB editor, 
and not understanding basic VB syntax constructs...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Gilles Tran
Subject: Re: Using Excel as a 3D engine
Date: 12 Mar 2008 09:49:59
Message: <47d7ed97@news.povray.org>

47d7eaea$1@news.povray.org...

> Yes. But Access has an additional "macro language" that only Access uses. 
> By default it seems to record macros with that.

No, you can't record a macro in Access. Recording macros is an 
Excel/Word/Powerpoint thing and it  (now) produces VBA code. I agree that 
"macro" as a term is inconsistently used in MS Office (a legacy issue I 
guess).

G.


-- 
*****************************
http://www.oyonale.com
*****************************
- Graphic experiments
- POV-Ray, Cinema 4D and Poser computer images
- Posters


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Using Excel as a 3D engine
Date: 12 Mar 2008 10:27:29
Message: <47d7f661$1@news.povray.org>

> I'm still at the level of not really knowing how to work the VB editor, 
> and not understanding basic VB syntax constructs...

RTFM? It is all explained...


Post a reply to this message

From: Invisible
Subject: Re: Using Excel as a 3D engine
Date: 12 Mar 2008 10:48:52
Message: <47d7fb64$1@news.povray.org>
Nicolas Alvarez wrote:

> RTFM? It is all explained...

Manual? Chance would be a fine thing!

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: scott
Subject: Re: Using Excel as a 3D engine
Date: 12 Mar 2008 12:33:24
Message: <47d813e4@news.povray.org>
> What is the "object browser"?

Right click in the code view and choose "Object Browser".  It basically 
shows every "object" available, and what its members are.  Help is available 
for every item.

> Now, if you call a macro with a cell range as its argument, how does that 
> work?

I don't have any experience with that, but I assume that the range would 
just be placed into a variable, just like if you passed a number or 
individual cell etc.  Look up "range" in the object browser and you'll see 
its member functions to work with it.

> I'm still at the level of not really knowing how to work the VB editor, 
> and not understanding basic VB syntax constructs...

Get a book?  Read a tutorial online?  Trial and error?


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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