Ducati Sporting Club UK

Ducati Sporting Club UK (/msgboard.php)
-   Idle Chat (/forumdisplay.php?f=102)
-   -   Excel Help Please (/showthread.php?t=27893)

EMPI 06-Mar-2006 12:27

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. :mad:

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?:puzzled:

Cheers
Stu

Iconic944ss 06-Mar-2006 12:40

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

chicken 06-Mar-2006 12:57

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

EMPI 06-Mar-2006 13:23

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.

chicken 06-Mar-2006 13:52

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).

EMPI 07-Mar-2006 14:22

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!

guest1 07-Mar-2006 14:41

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.


All times are GMT +1. The time now is 04:31.

Powered by vBulletin 3.5.4 - Copyright © 2000 - 2025, Jelsoft Enterprises Ltd.
© Ducati Sporting Club UK