Hallo Zusammen,
ich brauche eure Hilfe. Ich will mit einer Gui Namen und Vornamen in eine Excel speichern.
Wie bekomme ich es hin, dass das Skript automtaisch erkennt, das in der Excel Zeile schon etwas drin steht und automatisch den Wert in die nächste schreibt.?
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <excel.au3>
global $name,$vorname
form()
func form()
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 526, 97, 192, 114)
$label2 = GUICtrlCreateLabel("Vorname", 232, 0, 69, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$label1 = GUICtrlCreateLabel("Name", 0, 0, 46, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$name = GUICtrlCreateInput("", 49, 0, 167, 21)
$vorname = GUICtrlCreateInput("", 304, 0, 167, 21)
$Button1 = GUICtrlCreateButton("In Excel speichen", 144, 48, 227, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
Excel()
EndSwitch
WEnd
EndFunc
func Excel()
$Excel = _ExcelBookOpen("C:\namen.xls", 0)
_ExcelWriteCell($Excel, GUICtrlRead($vorname,1), 2, 2) ;Write to the Cell
_ExcelWriteCell($Excel, GUICtrlRead($name,1), 2, 3) ;Write to the Cell
_ExcelBookClose($Excel, 1, 0)
EndFunc