Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Excel Chart Size Probelm with Printer - Please Help

7 views
Skip to first unread message

Dennis Macdonald

unread,
Apr 22, 2010, 11:47:59 PM4/22/10
to
I create via VBA a number of charts on an Excel sheet. I want to size
each of these to suit a single page of the printer. THe problem I
have
is I cannot figure out the relationship between the Excel shape width
and the printer's printable width.

I have via a series of API got the printer's printable area and
converted to twips and points and as I understand Excel uses points
as
its chart width and height.


I have setup a page in Excel manually with no margins and created a
chart and manually sized it to fit the page perfectly (and yes the
page setup is 100% scaling and zero on all margins). Below is the
numbers I get;


Directly from the API
--------------------------------
Printable Height (Pixels)= 14031
Page Width (Pixels)= 9920
Page Height (Pixels) = 14033
PrtTopNoPrint (Pixels) = 0
PrtLeftNoPrint (Pixels) = 0
Printer Resolution (DPI) = 1200 x 1200
TwipsPerPixelX = 1.2
TwipsPerPixelY = 1.2
PointsPerPixelX = 0.06
PointsPerPixelY = 0.06


Directly from the Shape Object
----------------------------------------------
Shape Width (Points) = 766.5
Shape Height (Points) = 610.5


Landscape Page Orientation gives:
---------------------------------------------------
Printable Width (Pixels) = 14031
Printable Width (Twips) = 16837.2
Printable Width (Points) = 841.86


WHY IS DIFFERENCE 766.5 and 841.86?


Please Help.


Thanks,
Dennis.

0 new messages