Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Units for column widths in Excel
Message
 
 
À
05/11/2004 12:07:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Divers
Thread ID:
00958564
Message ID:
00958595
Vues:
13
James,

from the Excel help: The number that appears in the Standard column width box is the average number of digits 0-9 of the standard font that fit in a cell.

I think I'd avoid trying to worry about the actual widths and just fire off the autofit process:
    Cells.Select
    Cells.EntireColumn.AutoFit
I'm not sure if you can tell via automation how many horizontal pages the output will span. Tamar and Della's Office Automation book might give some detail on this.

>What is the unit of measure for column widths in Excel? On my machine, it appears that column widths are in multiples of 1/7 (how odd!), and that one inch on a printed page corresponds to 12 units.
>
>Are thes values constant? If not, is it possible to determine what these values are?
>
>I ask because I have an application with lots of grids, and I print them by exporting them to Excel and printing from there. The preference is to print them in Portrait, unless all the columns across do not fit on one page, but would fit if they were printed in Landscape.
>
>So, as I set the margins before printing, the real question is: How can I tell if all my columns will not fit if printed portrait, but will print if printed landscape?
>
>P.S.: Based upon user choices, there can be a variable number of columns in all my grids, and the user can change the column widths as well, so the determination of the actual printing width must be done at print time.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform