1. How do I add only the worksheets I generate.
You can either work directly on the default worksheets or you can simply remove them. Assuming wrkbook is your workbook object:
wrkbook.worksheets("Sheet1
2. How do I arrange my worksheets?
Use the move method of your sheet object.
mysheet.move(optional before as worksheet, optional after as worksheet)
Where 'before' is the sheet object you want it before or 'after' is the sheet you want it after. Only specify one or the other (either 'before' or 'after') not both.
3. How do I change the tab names?
Use the sheet's name property.
mysheet.name = "My Sheet"
4a. How can I autofit using code?
Use the autofit method of the range object.
mysheet.column(1).autofit
4b. Can I bold rows 1 and 2?
Use the bold property of the Range's font object
mysheet.rows(1).font.bold = true
5. Goodluck. IE likes to display anything that it can figure out. So if you save it with an .xls extension, IE will try to embed it and open it with excel. I think most people get around it by using zip files -- or they explicitly post info on the link telling users to right-click the link and choose the save target as... function.
Main Topics
Browse All Topics





by: TTomPosted on 2000-04-17 at 14:35:32ID: 2724553
As far as the formatting goes, it seems to me that you can output formatted HTML and it will be "reproduced" by Excel.
My .02pts,
Tom