Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo over 6 columns in excel - expand vertically
Message
From
23/12/2005 03:10:54
 
 
To
22/12/2005 15:21:09
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
01079925
Message ID:
01080439
Views:
16
It is all well that ends well :)

But I think what you did is more dificult.
Even if it is one page, knowing row where pagebreak occur
alows you to position/size your memo area accrdingly. Nice & easy.
No streaching no calculating size etc.

BTW I don't like to much idea of excel doing auto-streach,
because outcome could be unpredictable when different data come into play.
Even WodWrap is problematic in this respect.
I prefer to see text appear exactly as entered in source memo field.

If you hv limit of six columns horisontaly (other text on right side or above) maybe is not bad idea to decrease font by one rather then doing sizing streaching etc.

I send you automation class with real life usage sample, because you said that you are using excel automation extensively. It is set of very usefull wrappers, basically automated automation so I just tought you might make good use out of it.

uuups I hv to go for our little office party
(will be back after xmass)

Merry Christmass everyone :)




>Two reasons why I don't need a page break here:
>- this is a large sticker that I need to print, so it's single page forever
>- we prefer to churn sheets with minimal formatting for most reports, so the users can filter them at will - and so they get the habit to print less and rather fiddle with the data onscreen. Save a few trees that way... and speaking from experience, less formatting, less headache :).

>
>First, the wrap problem: a cell (or a block of merged cells) in Excel won't wrap when the cell is formatted as text (!). It needs to be formatted as general (or was it major or colonel?).
>
>As for the stubborn refusal of Excel to auto-stretch a merged block, the workaround is almost simple, sort of:
>
>- calculate the total width needed, i.e. the width of my merged block. The point here is that for a merged range of cells, .columns.count=1, no matter what. It doesn't make much sense, but so it is. So I've unmerged my block, and then calculated the sum of .ColumnWidths for its columns.
>- then I copied the text into a dummy cell in an unused part of the sheet (about ten rows down and a dozen columns to the right)
>- set the .columnWidth of that column to my calculated width
>- set that cell to .wrap=.t.; it automatically grows the row height to what it needs to be to show the full text (up to 1023 chars or so)
>- copied the cell's .rowheight to my block's .rowheight
>- deleted the whole column where my dummy cell was.
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform