Ducati Sporting Club UK
Idle Chat
Still needs to be clean and of value to the club.
 
 
Thread Tools Display Modes
  #1  
Old 06-Mar-2006, 12:27
EMPI EMPI is offline
Registered Forum User
Bevel Head
 
Posts: 82
Join Date: Sep 2005
Mood: Aroused
Excel Help Please

Im writing a program for a company the now and one of the requirnments was it outputs into excel. However I cant seem to get it to do what I want.

I want it to automatically adjust the height of a row of merged cells, ie the cells are merged so that they cover the width of the page and I want all the text in them to be visiable ie it automatically adjusts the height to fit the text. I have tried the Format->Row->Auto but it still doesnt do it. Have tried google, but keep getting the same answer

Anyone know any way to get this?

Cheers
Stu
Quote+Reply
  #2  
Old 06-Mar-2006, 12:40
Iconic944ss's Avatar
Iconic944ss Iconic944ss is offline
Registered Forum User
WSB Hero
Bikes: 1993 - 944SS & Aprilia Falco
 
Posts: 7,795
Join Date: Oct 2002
Merged cells can be cronic - I seem to remember an option in the 'cell-format' to unmerge the cells but this can lead to weird results...(save a copy before playing !!!)

Maybe then u could use the auto row format.

Maybe there is a macro or a commerical prog to help with this ????

Good luck
Quote+Reply
  #3  
Old 06-Mar-2006, 12:57
chicken's Avatar
chicken chicken is offline
Registered Forum User
Big Twin
 
Posts: 1,670
Join Date: Dec 2003
Mood: suck, squeeze, bang,......fart?
Stu,
I'm no good at the programming side but I do use Excel a lot in work.
If you have a defined width for your page then you can merge a certain number of cells to get one "cell" that runs across the width of the page (Format, Cells, Alignment, merge cells).

You can then get all the text to stay visible by selecting the "wrap text" option and then selecting Format, Row, Autofit.

You should be able to record this in a macro and then copy and paste the code into your program.

Hope this helps, Chi
Quote+Reply
  #4  
Old 06-Mar-2006, 13:23
EMPI EMPI is offline
Registered Forum User
Bevel Head
 
Posts: 82
Join Date: Sep 2005
Mood: Aroused
I'll give that a shot after my lunch, the cells are merged and i am using text wrap, however it doesn't show all the text unless you click the er... bit that resises the row (the bit at the side, dont know what to call it) and if you click and drag it works fine, but aiutomatically it doesnt work.

Didnt know you could specify a page width, will have a shot at that.
Quote+Reply
  #5  
Old 06-Mar-2006, 13:52
chicken's Avatar
chicken chicken is offline
Registered Forum User
Big Twin
 
Posts: 1,670
Join Date: Dec 2003
Mood: suck, squeeze, bang,......fart?
I just tried it and I see what you mean. You can either autofit the text in a single cell, or merge several cells together but not both.

Will have a play around between meetings and see what I come up with.

You can't specify page width per se, but you can add together a bunch of columns to get the width that you want (eg if your standard column is 8.43, you can group together more and more columns until you get the width that you want).
Quote+Reply
  #6  
Old 07-Mar-2006, 14:22
EMPI EMPI is offline
Registered Forum User
Bevel Head
 
Posts: 82
Join Date: Sep 2005
Mood: Aroused
I never got it to work yesterday so gave up and went home

I have now been told you can do it with a macro, so will take a look at that next, working on something else now so will get time to think about it.

Cheers for your help!
Quote+Reply
  #7  
Old 07-Mar-2006, 14:41
guest1 guest1 is offline
Registered Forum User
Big Twin
 
Posts: 1,173
Join Date: Mar 2008
empi - if you get stuck post again.
other than that have you tried woodyswatch?:-
http://www.wopr.com/cgi-bin/w3t/wwwthreads.pl

like chicken says merged cells are a pain but you can get them to work for you.
wrapping text in cells works also using Alt+Enter at end of line.
Quote+Reply
  
Thread Tools
Display Modes
Postbit Selector
Switch to Vertical postbit Use Vertical Postbit

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

Recent Posts - Contact Us - DSC Home - Archive - Top
Powered by vBulletin 3.5.4 - Copyright © 2000 - 2025, Jelsoft Enterprises Ltd. - © Ducati Sporting Club UK - All times are GMT +1. The time now is 08:30.