Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange formatting in an Excel file
Message
From
30/06/2003 07:27:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
30/06/2003 06:44:32
Michael Jones
Highland Primary Care NHS Trust
Inverness, United Kingdom
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00804564
Message ID:
00805221
Views:
62
>The results were as follows:
>
>The old machine with a normal VDU = 120 x 120
>
>The new pc with the plasma screen = 96 x 96
>
>Michael

Oh different ! Honestly I expected the old one be 96*96. That's what I get on almost any desktop monitor. Save a copy of your excel file with say test.xls name.
lcXLS = 'c:\myPath\test.xls'
oExcel = createobject('Excel.Application')
with oExcel
 .Workbooks.Open(lcXLS)
  With .ActiveSheet
  	WITH .Range('A1').Font
	  lnOneChar = TXTWIDTH('0',.Name,.Size) * FONTMETRIC(6,.Name,.Size)
	  lnChars  = lnOneChar * 96/120
  	EndWith
        lnCurHeight = .Range('1:1').RowHeight
  	.Cells.ColumnWidth = lnChars
  	.Cells.RowHeight = lnCurHeight * 96/120
  Endwith
  .Visible = .t.
endwith
Check if printing this outputs correct area.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform