Jump to content

Ams To Html


KintaRo
 Share

Recommended Posts

istek üzerine ams'de yaptığımız projedeki treelist nesnesindeki verileri html'e döküp görüntüleme işlemine ait bir örnek hazırladım.

Kodlar:
sDosya = _SourceFolder .. "\\Autoplay\\Docs\\yazdir.html"; -- html dosyasının yolu
sHeader = TextFile.ReadToString(_SourceFolder .. "\\Autoplay\\Docs\\header.html") -- yeni html dosyası için header bilgilerini al
TextFile.WriteFromString(sDosya, sHeader .. "\r\n", false) -- html dosyasını boşalt ve header bilgilerini yaz
-- listedeki verileri html e aktar
TextFile.WriteFromString(sDosya, "<table border=\"1\">\r\n", true) -- tabloyu oluştur
-- döngüyü başlat
nCount = TreeList.CountRows("Plugin1", true) -- kaç satir oldugunu say
for i=0,nCount-1 do
satirno = TreeList.GetCellText("Plugin1", i, 0)
satir = TreeList.GetCellText("Plugin1", i, 1)
TextFile.WriteFromString(sDosya, "<tr><td>" .. satirno .. "</td><td>" .. satir .. "</td></tr>", true)
end
TextFile.WriteFromString(sDosya, "</table></body></html>", true) -- tabloyu kapat ve footeri yaz

DialogEx.Show("yazdir") -- yazdirma penceresini goruntule

:download1:
 
http://www.mediafire.com/?xx9dpfyxxnauc44
Link to comment
Share on other sites

  • 1 yıl yıl...

Alfabetik sıra için veri çektiğiniz yer önemli. Eğer MySQL veya SQLite kullanıyorsanız çok kolay.

A-Z Örnek:


 

SELECT * FROM musteriler ORDER BY isim ASC

 

Z-A Örnek:

 

SELECT * FROM musteriler ORDER BY isim DESC
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...