Make a contactsheet (maxscript to excel)

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 10 October 2009   #1
Make a contactsheet (maxscript to excel)

Hi,

I'm searching a way to create, write and save via maxscript a excel (.xls) file. I know that i can open excel file via OLEobject but i don't know how to format and save it.

For example, i want to create a contactsheet of all objects in a scene
for each xls line --> put the preview (.jpg file) and the name of current object.
So cell A1= preview, cell B1= string name... and so on for each object.

I can't find documentation on how to format data for .xls filetype.
And, is there a way to put in excel (maybe via clipboard) a rendered image ?


    xl = createOLEObject "Excel.Sheet"
    
    for n=1 to objs.count do(
    	
    	cell_prev = xl.application.cells n 1		 --get the cell A1
    	cell_name = xl.application.cells n 2		--get the cell B1
    
       -- make the preview of current object, i have a function to do it
  	pastedImg = object render as a bitmap
  
  
    	cell_prev.value = pastedImg
    	cell_name.value = objs[n].name
    	
    	
    )--end loop on array
    
    -- save the xls file to a filename string like @"c:\obj_list.xls"
    ??????????
    
    -- close the xls file
    releaseOLEObject xl
    


Thanks for your advices
__________________
Rico)
=====================
 
Old 10 October 2009   #2
One thing that I have done is just write it out to a CSV file and import that into Excel.
__________________
Paul Neale
http://paulneale.com
 
Old 10 October 2009   #3
thanks PEN, you're right.

But i'd like to put an image into that file, not the path of this image....don't know if it's possible ?
.CSV file can not handle a picture while .XLS can.

Maybe i'd rather go with a HTML output format instead of making a .XSL
__________________
Rico)
=====================
 
Old 10 October 2009   #4
Or you could use a XML format and read that in to a browser using JS.
__________________
Paul Neale
http://paulneale.com
 
Old 10 October 2009   #5
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:06 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.