Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VfpxWorkBookXlsx by Greg Green
Message
De
29/08/2018 19:34:23
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
01661763
Message ID:
01661771
Vues:
54
>>>Hi,
>>>
>>>Anybody knows how to apply the method SetCellWordWrap() to set a column of the resulting Excel spreadsheet to Word Wrap?
>>>
>>>My code that converts an open cursor to the Excel is as follows:
>>>
>>>
>>>*-- The cursor is which is converted to Excel is open at this point. Then simply calling the method 
>>>*-- SaveTabletoWorkbook() (as seen below) creates excel.
>>>loExcel.SaveTabletoWorkbook(lcCursorName, cExcelFileName, .T., .T., tcWorkSheetName)
>>>
>>>
>>>The documentation refers to method SetCellWordWrap() which is supposed to set a cell to word-wrap. But how do I apply it, I am not clear.
>>
>>It's been years since the last time I had excel on my machine, so off the top of my head... shouldn't all formatting methods accept ranges as parameters? Or, alternatively, wouldn't any range have this method?
>>
>>In the latter case
>>
>>loRange=oWorkbook.range("C")
>>loRange.SetCellWordWrap()
>>
>>with perhaps .t. as parameter to set it on or .f. for off.
>>
>>>UPDATE: Is it against the etiquette of UT to address this message to Greg Green (since he may not be online on regular basis)?
>>
>>With the easily offended out of the picture, it's up to you. You may wait for him to see the message.
>
>1. On your first suggestion. The method SetCellWordWrap accepts 5 parameters (LPARAMETERS tnWB, tnSheet, tnCellRow, tnCellCol, tlWordWrap). My code (above) creates the Excel file. But I have no idea how to get the Id to the work book and Id to the sheet in workbook (first 2 parameters). The last parameter is pretty obvious, .T.
>
>2. I will wait a day or two before I address the message directly to Greg.

It's been a while since I last looked at it, but I think after you create the file you open it using class methods, which gives you a reference to the workbook. You then get a reference to a sheet within that workbook by using another method. As I recall it's fairly well documented, either in the PEMs reference or in various examples in the docs.

AFAIK I don't think Greg gets bent out of shape if you create a new thread directly to him, I think I've done that in the past. Does this forum have a global feature that sends you an e-mail if a forum message is sent to you? If there is and he's got that set up then it would probably come to his attention quicker if you address it to him.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform