Nöbetçi Eczaneleri verecek ve siteden çekecek

htsumer

Altın Üye
Altın Üye
Katılım
7 Eylül 2004
Mesajlar
941
Excel Vers. ve Dili
Excel-2003
Altın Üyelik Bitiş Tarihi
16.08.2026
Excel sayfasında
Adı-Tarih

A Eczanesi-25/06/2008

şeklinde girilecek

bu excelden web sayfası veri çekecek..

"25/06/2008 tarihinde hangi eczane nöbetçi ile onu verecek..

Bu scripti kimse hayrına vermiyor.:mrgreen:
Belki burda veren olur..
 
Katılım
25 Aralık 2005
Mesajlar
4,160
Excel Vers. ve Dili
MS Office 2010 Pro Türkçe
Sayın htsumer:

php ile excele bağlanma kodu:

Kod:
$conn=odbc_connect('excelSheet','',''); 
$query="SELECT * FROM sheet1"; 
$result=odbc_exec($conn,$query); 
while (odbc_fetch_row($result)) 
{ 
  $field1=odbc_result($result,1); 
} 
odbc_close($conn);
Ancak dah önce excel dosyanızı odbc ye tanıtmanız gerekiyor.

İyi çalışmalar
 
Katılım
25 Aralık 2005
Mesajlar
4,160
Excel Vers. ve Dili
MS Office 2010 Pro Türkçe
Sayın htsumer,

ODBC ile bağlanın:

Kod:
oConn.Open "Driver={Microsoft Excel Driver (*.xls)};" & _
"DriverId=790;" & _
"Dbq=c:\somepath\mySpreadsheet.xls;" & _
"DefaultDir=c:\somepath
sonra sql kodunu çalıştırın:

Kod:
'After creating an ODBC connectoin the query is
SQL = "SELECT * FROM [Sayfa1$]" 
'To read the columns 
<% 
valore = rs(n) 
%>
'where n is the column number (es. A=0, B=1, etc...)
Bu da asp kodu.

İyi çalışmalar
 
Katılım
25 Aralık 2005
Mesajlar
4,160
Excel Vers. ve Dili
MS Office 2010 Pro Türkçe
Sayın htsumer,

Bu da tam bir html sayfası içinde yapmanız gerekenler:

Kod:
<html>
<title>CodeAve.com(Display an Excel in ASP)</title>
<body bgcolor="#FFFFFF">
<!--#include file="adovbs.inc"-->

<%
' Import constants from adovbs.inc specifically 
'adOpenStatic and adLockPessimistic 

'Name of the excel file being displayed
exceldb="greenberg.xls"

' Create a server connection object
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "DBQ=" & Server.MapPath(exceldb) & ";" & _
"DRIVER={Microsoft Excel Driver (*.xls)};"


' Create a server recordset object
Set rs = Server.CreateObject("ADODB.Recordset")

' Query to run against the exceldb
' hamerin_hank is the name of the 
' cell range as defined in excel
sql="select * from hammerin_hank;"

' Execute the sql
rs.Open sql, cn, _
adOpenStatic, adLockPessimistic
%>
<table border=1 align=center>
<caption>Hank Greenberg Career Statistics</caption><%
For counter = 0 To rs.fields.count - 1 %>
<th>
<% ' Write out the field names 
response.write rs.fields.item(counter).name %>
</th><%
' Move to the next field
next 

' Move to the first record
rs.movefirst

' Write out the record set
do while not rs.eof %>
<tr><% 
' Loop through all of the fileds
for counter = 0 to rs.fields.count - 1
%>
<td align=right>
<% ' Write out the field values 
response.write rs.fields.item(counter).value %>
</td><%
' Move to the next field
next 
%>
</tr><%
' Move to the next record
rs.movenext
loop
%>
</table>

<%
' Kill the recordset
rs.close
Set rs = nothing
' Kill the connection
cn.close
Set cn = nothing
%>

</body>
</html>
İyi çalışmalar:)
 
Katılım
25 Aralık 2005
Mesajlar
4,160
Excel Vers. ve Dili
MS Office 2010 Pro Türkçe
Bu da ayrı bir örnek:



Kod:
[COLOR=#000080][FONT=Comic Sans MS]strConnection = "DBQ=" & Server.MapPath("customer-list.xls") & "; DRIVER={Microsoft Excel Driver (*.xls)};"[/FONT][/COLOR]

[COLOR=#000080][FONT=Comic Sans MS]Set cn = Server.CreateObject("ADODB.Connection")[/FONT][/COLOR]
[COLOR=#000080][FONT=Comic Sans MS]Set rs = Server.CreateObject("ADODB.Recordset")[/FONT][/COLOR]
[COLOR=#000080][FONT=Comic Sans MS]cn.open strConnection[/FONT][/COLOR]


[COLOR=#000080][FONT=Comic Sans MS]sql="select * from sales_in_2005;"[/FONT][/COLOR]

[COLOR=#000080][FONT=Comic Sans MS]rs.Open sql, cn, adOpenStatic, adLockPessimistic[/FONT][/COLOR]


[COLOR=#000080][FONT=Comic Sans MS]do while not rs.eof[/FONT][/COLOR]
[COLOR=#000080][FONT=Comic Sans MS]    response.write rs("customerName") & " : " & rs("soldPrice") & "<br/>"[/FONT][/COLOR]
[COLOR=#000080][FONT=Comic Sans MS]rs.movenext[/FONT][/COLOR]
[COLOR=#000080][FONT=Comic Sans MS]loop[/FONT][/COLOR]


[COLOR=#000080][FONT=Comic Sans MS]rs.close[/FONT][/COLOR]
[COLOR=#000080][FONT=Comic Sans MS]Set rs = nothing[/FONT][/COLOR]
[COLOR=#000080][FONT=Comic Sans MS]cn.close[/FONT][/COLOR]
[COLOR=#000080][FONT=Comic Sans MS]Set cn = nothing[/FONT][/COLOR]
 

htsumer

Altın Üye
Altın Üye
Katılım
7 Eylül 2004
Mesajlar
941
Excel Vers. ve Dili
Excel-2003
Altın Üyelik Bitiş Tarihi
16.08.2026
Say&#305;n modal&#305; te&#351;ekk&#252;r ederim.Linux hostum var.
Yukardakileri bir deneyece&#287;im ama yapaca&#287;&#305;m&#305; sanm&#305;yorum..

Sadece &#351;unu istiyorum.excel n&#246;b.eczaneleri yaz&#305;p test.php ile &#231;ekmek..
 
Katılım
25 Aralık 2005
Mesajlar
4,160
Excel Vers. ve Dili
MS Office 2010 Pro Türkçe
Sayın htsumer,

Linuxtan excel açabilmek için api ye ihtiyacınız var. Aşağıdaki örnekleri inceleyin.
 

htsumer

Altın Üye
Altın Üye
Katılım
7 Eylül 2004
Mesajlar
941
Excel Vers. ve Dili
Excel-2003
Altın Üyelik Bitiş Tarihi
16.08.2026
Say&#305;n modal&#305;,
Valla o kadar iyi de&#287;ilim.Hosta att&#305;m .php &#231;al&#305;&#351;t&#305;rd&#305;m ama yapamad&#305;m..O kadar iyi de&#287;ilim..Te&#351;ekk&#252;r ederim..:(
 
Katılım
8 Mart 2009
Mesajlar
2
Excel Vers. ve Dili
2007 turkce
sayın modalı yukarıda linux çalışmak için gerekli zipli dosya yok link calışmıyor bi kontrol edermisiniz
cok teşşurler
muratozkan
 
Katılım
2 Ağustos 2013
Mesajlar
2
Excel Vers. ve Dili
2010
:) güzel düşünülmüş birşey örneklemeler benm de işime yaradı ilk verilen örnek özellikle teşekkürler

Konteyner
 
Üst