hallo...gibts irgendeine udf welche bestimmte werte in eine tabelle schreibt?
am besten wäre html da es sein kann das manche kein excel haben.
Tabelle in html schreiben
-
- [ offen ]
-
Reaker -
5. September 2009 um 17:30 -
Geschlossen -
Erledigt
-
-
-
hey...
glaube das gibt es nicht ....das ist aber schnell selbst gebastelt...
guck dir FileOpen() an FileWrite() u FileClose()
dann musst du natürlich die html befehle wissen wie man ne Tabelle erstellt...
das ganze dann in ne Tabelle.html geschrieben und fertig...MFg chris
-
Hatte da noch was rumliegen:
Spoiler anzeigen
[autoit]Global $a[3][3] = [['1','2','3'],['1.1','1.2','1.3'],['2.1','2.2','2.3']]
[/autoit] [autoit][/autoit] [autoit]ConsoleWrite(_ArrayToHTMLTable($a,true,false))
[/autoit] [autoit][/autoit] [autoit]; #FUNCTION# ===================================================================
[/autoit] [autoit][/autoit] [autoit]
; Name ..........: _ArrayToHTMLTable
; Description ...: Creates a HTML-table from a 2dim-array
; AutoIt Version : V3.3.0.0
; Syntax ........: _ArrayToHTMLTable(ByRef $aArray[, $bHeader = True[, $bBorder = True[, $sStyle = 'width:100%']]])
; Parameter(s): .: $aArray -
; $bHeader - Optional: (Default = True) :
; $bBorder - Optional: (Default = True) :
; $sStyle - Optional: (Default = width: 100%) : StyleSheet
; Return Value ..: Success - string
; Failure - empty string
; @ERROR -
; Author(s) .....: Thorsten Willert
; Date ..........: Wed Jul 01 18:07:39 CEST 2009
; Version .......: 1.0
; ==============================================================================
Func _ArrayToHTMLTable(ByRef $aArray, $bHeader = True, $bBorder = True, $sStyle = 'width:100%')
Local $iD1 = UBound($aArray,1)
If @error Then
SetError(1)
Return ''
EndIf
Local $iD2 = UBound($aArray,2)
If @error Then
SetError(1)
Return ''
EndIfLocal $sTable = ""
[/autoit] [autoit][/autoit] [autoit]
If $sStyle <> '' Then $sStyle = ' style="' & $sStyle & '"'
$sStyle &= '>'If $bBorder Then
[/autoit] [autoit][/autoit] [autoit]
$sTable &= '<table border="1"'
Else
$sTable &= '<table'
EndIf
$sTable &= $sStyle & @CRLFLocal $iStart = 0
[/autoit] [autoit][/autoit] [autoit]
If $bHeader Then
$iStart = 1
$sTable &= '<tr>' & @CRLF
For $i = 0 To $iD2 -1
$sTable &= @TAB & '<th>' & $aArray[0][$i] & '</th>' & @CRLF
Next
$sTable &= '</tr>' & @CRLF
EndIfFor $i = $iStart To $iD1 -1
[/autoit] [autoit][/autoit] [autoit]
$sTable &= '<tr>' & @CRLF
For $j = 0 To $iD2 -1
$sTable &= @TAB & '<td>' & $aArray[$i][$j] & '</td>' & @CRLF
Next
$sTable &= '</tr>' & @CRLF
Next$sTable &= '</table>' & @CRLF
[/autoit] [autoit][/autoit] [autoit]Return $sTable
[/autoit]
EndFunc ;==> _ArrayToHTMLTabledie Rückgabe ist allerdings keine vollwertige HTML-Datei sondern nur die Tabelle. Zeigt allerdings jeder Browser auch so an.
-
ja das mit filewrite ist ziemlich aufwändig...
ich würde es gerne so machen dass die erste zeile schonmal vordefiniert ist, auch so von breite der einzelnen zellen...
dann soll mein skript eine zahl auslesen, wenn sie zb 3 ist, soll unter die erste zeile nochmal zweimal die gleiche zeile..versteht ihr? -
-
-
hehe so doof bin a net...
html grundlagen kann ich auch^^
hab jetz in excel eine gemacht und als website gespeichert...da werde ich dann ein bisschen rumtüfteln...blöden office websites sind immer so dumm aufgebaut!!