>>#define xlLastCell 11 >>#define xlCellValue 1 >>#define xlEqual 3 >> >>LOCAL oExcel AS Excel.Application >>oExcel = CREATEOBJECT([Excel.Application]) >> >>oExcel.Workbooks.Open([d:\book1.xls]) >>oExcel.Visible = .t. >>oExcel.Range([A1],; >> oExcel.Selection.SpecialCells(xlLastCell)).Select >>oExcel.Selection.FormatConditions.Delete >>oExcel.Selection.FormatConditions.Add(xlCellValue, xlEqual,"Total") >>With oExcel.Selection.FormatConditions(1).Font >> .Bold = 1 >> .Italic = 0 >> .Strikethrough = 0 >>EndWith >>>>But I couldnt made it works with whole selection and IF the cell contains [Total] not just equal to it.
#define xlLastCell 11 #define xlCellValue 1 #define xlEqual 3 LOCAL oExcel AS Excel.Application, loSheetAfter oExcel = CREATEOBJECT([Excel.Application]) oExcel.Workbooks.Open([d:\book1.xls]) oExcel.Visible = .t. m.loSheetAfter = oExcel.ActiveWorkbook.Sheets(oExcel.ActiveWorkbook.Sheets.Count) oExcel.ActiveWorkbook.Sheets.Add(,m.loSheetAfter,1)2. It depends if both tables contains different types of data it is better to show it in a new sheet, but if the data is similar and all rows doesn't exceed 65535 rows then show it in one sheet.