C.o.f.f.e.e Script To Access Excel File To Get Set
-
On 20/08/2013 at 18:42, xxxxxxxx wrote:
User Information:
Cinema 4D Version: Demo
Platform: Windows ;
Language(s) : C.O.F.F.E.E ; XPRESSO ;---------
I have the Excel file which contains all style guide that controls lighting, material, cameras and additional object layers. I need to write COFFEE script which need to get the value from Excel. I'm actually new in for Cinema4d and COFFEE script, appreciate if someone could advice on this. Any advice/references is highly appreciated. -
On 21/08/2013 at 00:54, xxxxxxxx wrote:
You won't be able to read a native Excel file, I think. What you could do is export the Excel data as a .CSV file, that's just a text file so much easier to manipulate.
Then you'll need to load and parse that file. A very long time ago I wrote a brief note on how to read a .CSV file, and it's still on my site at http://www.microbion.co.uk/developers/csv.htm. It's written in VB but should be translatable into COFFEE (which is sort of like Javascript). But you're on your own with how to open the file and read it in using COFFEE.
Once you have done that, then you can think about how to use the values from the file in a C4D scene, assuming that's what you are hoping to do.
Good luck!
Steve
-
On 21/08/2013 at 02:56, xxxxxxxx wrote:
For this level of plugin, you would be served much better using the Python interface. COFFEE is just not that expansive and powerful for the things that you intend to accomplish.