Excel PrintArea

Bonjour, comment dfinir une zone d’impression avec la classe “ExcelAreas” ??
mais comment crire le code, je bloque compltement…

merci.

Here is an example that shows a print area. Does your question mean ExcelAreas = PrintArea?

[code]Dim excel as new ExcelApplication
excel.Workbooks.Add
excel.visible = true

//New data in cells
excel.Range(“A1:C3”).Value = “text”

//Print cell data
excel.ActiveSheet.PageSetup.PrintArea = “A1:B2”
MsgBox “Print area has a box on Excel”
excel.ActiveSheet.Range(“A1:B2”).Printout

//Close excel
excel.ActiveWorkbook.close false
excel.Quit
excel = nil

Exception err as OLEException
MsgBox err.message[/code]

Let me know if I misunderstand. :slight_smile:

[quote=333048:@Eugene Dakin]Here is an example that shows a print area. Does your question mean ExcelAreas = PrintArea?

[code]Dim excel as new ExcelApplication
excel.Workbooks.Add
excel.visible = true

//New data in cells
excel.Range(“A1:C3”).Value = “text”

//Print cell data
excel.ActiveSheet.PageSetup.PrintArea = “A1:B2”
MsgBox “Print area has a box on Excel”
excel.ActiveSheet.Range(“A1:B2”).Printout

//Close excel
excel.ActiveWorkbook.close false
excel.Quit
excel = nil

Exception err as OLEException
MsgBox err.message[/code]

Let me know if I misunderstand. :)[/quote]
Oui, je voulais savoir s’il fallait utiliser excelarea for printarea, mais je vois que non!!

Merci beaucoup ! C’est super !