deutschsprachige FoxPro User Group
Forum View
Home
  
  Re: Zugriff auf Excel 2016- #17713 in section [741796]
Sec: (51) MS-Visual FoxPro 9.0
Von: Matthias Kahlert
An: Christoph Zintel
Am/Um: 19.12.2018 15:08:57 gelesen

--from Newsreader at Mittwoch, 19. Dezember 2018; 15:08:57--

Am 18.12.2018 um 12:42 schrieb Christoph Zintel:
> die save-Methode betrifft das Workbook, das Du öffnest. Probier's mal so:
>
> LOCAL oExcel
> oExcel = CREATEOBJECT("Excel.Application")
> oExcel.Application.workbooks.OPEN("c:\test.xlsx")
> cZelle = "Tabelle2!A2"
> oExcel.Range(cZelle).Value = "Hallo Welt"
>
> oExcel.activeworkbook.Save()

Variante:

LOCAL oExcel, oWorkbook
oExcel = CREATEOBJECT("Excel.Application")
oWorkbook = oExcel.Application.Workbooks.Open("c:\test.xlsx")
oSheet = oWorkbook.Sheets(2)
oSheet.Cells(1,2).Value = "Hallo Welt"
oWorkbook.Save()

--
Matthias



Georg Hoelscher   18.12.2018 10:57
Christoph Zintel  18.12.2018 12:42
Georg Hoelscher  18.12.2018 13:30
Georg Hoelscher  18.12.2018 13:30
Matthias Kahlert  19.12.2018 15:08
Georg Hoelscher  20.12.2018 11:01
  
zurück zum Forum