Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel columnwidth type mismatch
Message
De
31/03/2006 12:05:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01109500
Message ID:
01109560
Vues:
29
Thanks Borislav

on further inspection there seems to be something else causing a problem as its happened a few times when the worksheet is visible. So I'll have to keep digging.

Thanks for looking.

Nick

>>Hi
>>
>>I'm creating an excel spreadsheet and want to adjust the columnwidth to the size of some text.
>>
>>the line
>>
>>.sheets(lnsheet).Columns(CHR(ncol+64 )+":"+CHR(ncol+64)).ColumnWidth=lncolwidth
>>
>>works perfectly if I set excel to be visible.
>>
>>But if I set excel to be not visible the same line gives me a type mismatch.
>>
>>Any ideas why that is .
>>
>>This is excel97 (be 10 years old soon)
>>
>>Nick
>
>Thsi works for me, BUT I have only Office 2003 installed:
>
>LOCAL oExcel AS Excel.Application
>nCol = 5
>lncolwidth = 120
>oExcel = NEWOBJECT([Excel.Application])
>oExcel.Visible = .f.
>oExcel.Workbooks.Add()
>oExcel.ActiveWorkbook.sheets(1).Columns(CHR(nCol+64)).ColumnWidth=120
>oExcel.Visible = .t.
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform