ole操作excel(OLE操作Excel) PB call EXCEL operation is a good way to report output collection For more Chinese statements, although after the strong backing of DW, but it is difficult to cope plex fatigue. But we can see that the output of the data is in the field of table or the field of calculation. Just a lot of statistical patterns and different modes of presentation. I have finished a system in a year ago, but the customer is almost every other day there's something new to the output report. And finally I found out. It's also a good way to get your clients to be in Excel, and then write them to output. The key is that customers do not need to enter their own system, so the data will not be any problem. If there is any problem with the software itself, it will be easy to see the results written in excel. Although it takes a lot of time to write excel forms, it reduces the trouble of importing, importing and outputting. Reprinted excel operation daquan: PowerBuilder operation mand Daquan (examples of some wrong places)! ) 2006-12-04 16:43 1. create Excel objects Eole=CREATEOBJECT ('') 2. add new workbook
3. set up third worksheets to activate worksheet ("sheet3").Activate 4. opens the specified Workbook ("c:\temp\") 5. displays the Excel window =.t. 6. change the title bar of Excel = "VFP applications call Microsoft Excel" 7. assign values to cells (1,4).Value=XM (XM is the name of the database field) 8. sets the width of the specified column (unit: number of characters) (1).ColumnWidth=5 9. sets the height of the specified row (unit: pound) (1).RowHeight=1/ (set the line height to 1 cm, 1 pounds = cm) 10. in Eighteenth rows before the insert page breaks ("Sheet1").Rows (18).PageBreak=1 11. in the fourth column before deleting the page breaks