Export Fields and Columns

#ProductIDProductNameSupplierIDCategoryIDQuantityPerUnitUnitPrice
1 My ID is - 1 vvbvcbcbcbii 1 1 10 boxes x 20 bags 18
2 My ID is - 2 Chang55dd 1 1 24 - 12 oz bottles 19
3 My ID is - 3 Syrddu 1 2 12 - 550 ml bottles 10
4 My ID is - 4 Chef Anton's Cajun Seasoning 2 2 48 - 6 oz jars 22
5 My ID is - 5 asdf 2 2 36 boxes 21.35
6 My ID is - 6 Grandma's Boysenberry Spread 3 2 12 - 8 oz jars 25
7 My ID is - 7 Uncle Bob's Organic Dried Pears 3 7 12 - 1 lb pkgs. 30
8 My ID is - 8 Northwoods Cranberry Sauce 3 2 12 - 12 oz jars 40
9 My ID is - 9 Mishi Kobe Niku 4 6 18 - 500 g pkgs. 97
10 My ID is - 10 Ikura 4 8 12 - 200 ml jars 31

bottom next goreload

[1 - 10 : 81]

Export Fields 0, 1, 2 & 3 (Row)
1vvbvcbcbcbii11

Export Columns 4 and 5
10 boxes x 20 bags18
24 - 12 oz bottles19
12 - 550 ml bottles10
48 - 6 oz jars22
36 boxes21.35
12 - 8 oz jars25
12 - 1 lb pkgs.30
12 - 12 oz jars40
18 - 500 g pkgs.97
12 - 200 ml jars31

Export Fields and Columns
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
   Dim GD As New Tornado.Getdata()
   Dim Export As New Tornado.Z()
   With Export
      .dbQP = "U=13| S=13| M=ty=G!sysindex=t| Gdf=0,1,2,3,4,5| Ps=10|D=Nwind.mdb|Q=Products|Th=Tit=Export Fields and Columns"
      .dbGridMagicCell = "field=0|macro=My ID is - #0#"
      .dbExportFlds = "(0),1,2,3"             'Export Fields
      .dbExportCols = "4,(5)"                  'Export Columns
      .ASPdbNET()
   End With

'------ User Code to process Exported data --------

   Response.Write("<Center><P><table class=ts cellspacing='1'><tr><td class=gh COLSPAN=4>Export Fields 0, 1, 2 & 3 (Row)</td><tr>")
   Dim c As Integer
   Dim r As Long
   Dim arr() As String = GD.Get_Fexport
   For c = 0 To UBound(arr)
      Response.Write("<td class=nr align=center>" & arr(c) & "</td>")
   Next c
   Response.Write("</tr></table>")
   Response.Write("<Center><P><table class=ts cellspacing='1'><tr><td class=gh COLSPAN=2>Export Columns 4 and 5</td>")
   Dim Carr(,) As String = GD.Get_Cexport
   For r = 0 To UBound(Carr, 2)
      Response.Write("<tr>")
      For c = 0 To UBound(Carr, 1)
         Response.Write("<td class=nr align=center>" & Carr(c,r) & "</td>")
      Next c
      Response.Write("</tr>")
   Next r
   Response.Write("</table></center>")
End Sub
</script>
Example form Special Features - Data Export

Send comments on this topic.
Copyright (c) 1998-2006 ASP-db