[thelist] [ASP] Resize Excel Column

Jacques Capesius jacques_capesius at cnt.com
Thu Nov 7 11:29:01 CST 2002


Hi guys,

Sorry to keep bothering with Excel questions but this is driving me nuts.
I'm trying to programatically resize a column in an excel spreadsheet that
I'm creating. What would be really helpful would be some reference to the
Excel COM object complete with objects and methods, but my searching is
bearing no fruit. Anyway, here's some code...


Set objSpreadsheet = Server.CreateObject("Excel.Sheet")
objSpreadsheet.Application.Visible = True
objSpreadsheet.Application.Cells(1,1).Value = "Email"
objSpreadsheet.Application.Cells(1,1).Font.Bold = True

now, to this I want to add something that will make the first column wide
enough to display, say, 50 character long strings. trying stuff like..
"objSpreadsheet.Application.Columns(1).Size", ".Length", ".Width" gives me
errors. The MSDN site isn't helping much, neither is google, so far.

Do any of you guys know of a reference where I can find the method I need to
do this sort of thing?

thanks a million.

-jacques :)



More information about the thelist mailing list