Import/Export Excel Using OLE Basic In PowerBuilder
Import Excel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
oleobject xlApp, xlBook, xlSheet Integer net , ll_value , ll_return , ll_error_cnt ,ll_error_cnt1 String ls_file, ls_name, ls_txt_file Long ll_ins_row Long ll_tot_Row , ll_tot_col , ll_row, ll_col Long ll_department_id , ll_manager_id,ll_location_id String ls_depart_name String ls_Coltype, ls_colname // Initialize the variable SetPointer (HourGlass!) dw_data.Reset() ll_error_cnt = 0 ll_error_cnt1 = 0 //Get the path and file name to save ll_value = GetFileSaveName("Select Excel File", ls_file, ls_name, "xls;xlsx" , "Excel Files (*.xls;*.xlsx),*.xls*;*.xlsx, All Files (*.*),*.*") If ll_value = 1 Then If FileExists ( ls_file ) Then Else MessageBox("Warning", "No Excel file to upload.!!") Return End If Else Return; End If // Using Excel OLE xlApp = Create oleobject ll_return = xlApp.ConnectToNewObject( "excel.application" ) If ll_return < 0 Then MessageBox("An error occurred when connecting to Excel..~r~n Check if Excel is installed on your computer..!",String(ll_return)) SetPointer(Arrow!) Return End If //Open Excel xlApp.Application.Visible = False xlApp.Workbooks.Open(ls_file) xlBook = xlApp.Application.WorkBooks(1) xlSheet = xlBook.Worksheets(1) // total row col count ll_tot_Row = xlApp.ActiveSheet.UsedRange.Rows.Count //Total rows of excel to upload ll_tot_col = xlApp.ActiveSheet.UsedRange.Columns.Count //Total columns of exe to upload If ll_tot_col = 4 Then dw_data.DataObject = "d_departments" ElseIf ll_tot_col = 12 Then dw_data.DataObject = "d_employees" Else MessageBox("Warning", "File invalid department") Return End If If ll_tot_col = 4 Then //departments basic read/wirte datawindow column //For ll_row = 2 To ll_tot_Row + 1 //If head exists in Excel, it starts from 2. For ll_row = 2 To ll_tot_Row ll_department_id = Long(xlSheet.cells(ll_row,1).Value) ls_depart_name = String(xlSheet.cells(ll_row,2).Value) ll_manager_id = Long(xlSheet.cells(ll_row,3).Value) ll_location_id = Long(xlSheet.cells(ll_row,4).Value) If ll_department_id = 0 Then MessageBox("Warning",'There is an invalid department id in the format.') Exit End If If Trim(ls_depart_name) = '' Or IsNull(ls_depart_name) Then MessageBox("Warning","There is an invalid department name is null") Exit End If ll_ins_row = dw_data.InsertRow(0) dw_data.Object.department_id[ll_ins_row] = ll_department_id dw_data.Object.depart_name[ll_ins_row] = ls_depart_name dw_data.Object.manager_id[ll_ins_row] = ll_manager_id dw_data.Object.location_id[ll_ins_row] = ll_location_id Next ElseIf ll_tot_col = 12 Then //dynamic read/wirte datawindow column For ll_row = 2 To ll_tot_Row ll_ins_row = dw_data.InsertRow(0) For ll_col = 1 To ll_tot_col ls_colname = dw_data.Describe ("#"+String(ll_col)+".name") ls_Coltype = dw_data.Describe (ls_colname+".Coltype") If left(Lower(ls_Coltype),4) = "char" Then dw_data.Object.Data[ll_ins_row,ll_col] = String( xlSheet.cells(ll_row,ll_col).Value) Else dw_data.Object.Data[ll_ins_row,ll_col] = Dec( xlSheet.cells(ll_row,ll_col).Value) End If Next Next End If //Close Excel xlApp.Application.Quit xlApp.DisconnectObject() Destroy xlSheet Destroy xlBook Destroy xlApp MessageBox("Warning",'Excel file successfully uploaded!!') SetPointer(Arrow!) |
Export Excel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
Int li_columnCount, li_column, li_row String ls_colname, ls_headertext Long ll_value String ls_file, ls_name OLEObject xlApp, xlBook, xlSheet //Check Data If dw_data.RowCount() < 1 Then Return //Connect Excel xlApp = Create OLEObject If xlApp.ConnectToNewObject("excel.application") <> 0 Then MessageBox("Warning",'OLE cannot connect! Please check whether your EXCEL is installed correctly!') Return End If //Get the path and file name to save ll_value = GetFileSaveName("Select Excel File", ls_file, ls_name, "xlsx" , "Excel Files (*.xls;*.xlsx),*.xls*;*.xlsx, All Files (*.*),*.*") If ll_value = 1 Then If FileExists ( ls_file ) Then FileDelete(ls_file) End If Else Return End If SetPointer (HourGlass!) // Add Sheet xlApp.Application.Visible = False //hide excel xlApp.DisplayAlerts = False xlBook = xlApp.Workbooks.Add() xlSheet = xlBook.WorkSheets(1) //Format Row Header xlSheet.Rows("1:1").Select xlSheet.Rows(1).RowHeight = 25 xlSheet.Rows(1).Font.Size = 14 xlSheet.Rows(1).Font.Bold = True xlSheet.Columns(1).ColumnWidth = 15 // using column number //xlSheet.Columns(1).Borders().LineStyle = 1// using column number xlSheet.Columns("B").ColumnWidth = 25 // using column name xlSheet.Columns("C").ColumnWidth = 15 // using column name xlSheet.Columns("D").ColumnWidth = 15 // using column name //Write Hearder li_columnCount = Integer(dw_data.Describe('DataWindow.Column.Count')) For li_column = 1 To li_columnCount ls_colname = dw_data.Describe ("#"+String(li_column)+".name") ls_headertext = dw_data.Describe (ls_colname + "_t.text") xlSheet.cells(1,li_column).Value = ls_headertext xlSheet.cells(11,li_column).Borders().LineStyle = 1 //set Borders Next //Write Detail For li_row = 1 To dw_data.RowCount() For li_column = 1 To li_columnCount xlSheet.cells(li_row + 1,li_column).Value = dw_data.Object.Data[li_row,li_column] xlSheet.cells(li_row + 1,li_column).Borders().LineStyle = 1 //set Borders Next Next //Save To File If Pos(Lower(ls_file), ".xlsx") > 0 Then xlBook.SaveAs(ls_file, 51) Else xlBook.SaveAs(ls_file, 39) End If //xlApp.Application.activeworkbook.worksheets[1].cells(1,1).Value = "This is the first SHEET" //xlApp.activeworkbook.worksheets[2].cells(1,1 ).Value = "This is the second sheet" //xlApp.activeworkbook.worksheets[3].cells(1,1).Value = "This is the third SHEET" //By specifying parameter 1 in worksheets[1] , 2, 3 to set to different sheets can be //xlApp.activeworkbook.SaveAs(ls_file, 39) //Close xlBook.Close() xlApp.Application.quit() xlApp.DisconnectObject() Destroy xlApp MessageBox("Warning",'Excel file successfully Export!!') SetPointer(Arrow!) |
example code
w_main from window
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
forward global type w_main from window end type type cb_export from commandbutton within w_main end type type dw_data from datawindow within w_main end type type cb_import from commandbutton within w_main end type end forward global type w_main from window integer width = 2665 integer height = 1524 boolean titlebar = true string title = "Import/Export Excel Using OLE Basic" boolean controlmenu = true boolean minbox = true boolean maxbox = true boolean resizable = true long backcolor = 67108864 string icon = "AppIcon!" boolean center = true cb_export cb_export dw_data dw_data cb_import cb_import end type global w_main w_main on w_main.create this.cb_export=create cb_export this.dw_data=create dw_data this.cb_import=create cb_import this.Control[]={this.cb_export,& this.dw_data,& this.cb_import} end on on w_main.destroy destroy(this.cb_export) destroy(this.dw_data) destroy(this.cb_import) end on type cb_export from commandbutton within w_main integer x = 2158 integer y = 1260 integer width = 402 integer height = 112 integer taborder = 30 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Export" end type event clicked;Int li_columnCount, li_column, li_row String ls_colname, ls_headertext Long ll_value String ls_file, ls_name OLEObject xlApp, xlBook, xlSheet //Check Data If dw_data.RowCount() < 1 Then Return //Connect Excel xlApp = Create OLEObject If xlApp.ConnectToNewObject("excel.application") <> 0 Then MessageBox("Warning",'OLE cannot connect! Please check whether your EXCEL is installed correctly!') Return End If //Get the path and file name to save ll_value = GetFileSaveName("Select Excel File", ls_file, ls_name, "xlsx" , "Excel Files (*.xls;*.xlsx),*.xls*;*.xlsx, All Files (*.*),*.*") If ll_value = 1 Then If FileExists ( ls_file ) Then FileDelete(ls_file) End If Else Return End If SetPointer (HourGlass!) // Add Sheet xlApp.Application.Visible = False //hide excel xlApp.DisplayAlerts = False xlBook = xlApp.Workbooks.Add() xlSheet = xlBook.WorkSheets(1) //Format Row Header xlSheet.Rows("1:1").Select xlSheet.Rows(1).RowHeight = 25 xlSheet.Rows(1).Font.Size = 14 xlSheet.Rows(1).Font.Bold = True xlSheet.Columns(1).ColumnWidth = 15 // using column number //xlSheet.Columns(1).Borders().LineStyle = 1// using column number xlSheet.Columns("B").ColumnWidth = 25 // using column name xlSheet.Columns("C").ColumnWidth = 15 // using column name xlSheet.Columns("D").ColumnWidth = 15 // using column name //Write Hearder li_columnCount = Integer(dw_data.Describe('DataWindow.Column.Count')) For li_column = 1 To li_columnCount ls_colname = dw_data.Describe ("#"+String(li_column)+".name") ls_headertext = dw_data.Describe (ls_colname + "_t.text") xlSheet.cells(1,li_column).Value = ls_headertext xlSheet.cells(11,li_column).Borders().LineStyle = 1 //set Borders Next //Write Detail For li_row = 1 To dw_data.RowCount() For li_column = 1 To li_columnCount xlSheet.cells(li_row + 1,li_column).Value = dw_data.Object.Data[li_row,li_column] xlSheet.cells(li_row + 1,li_column).Borders().LineStyle = 1 //set Borders Next Next //Save To File If Pos(Lower(ls_file), ".xlsx") > 0 Then xlBook.SaveAs(ls_file, 51) Else xlBook.SaveAs(ls_file, 39) End If //xlApp.Application.activeworkbook.worksheets[1].cells(1,1).Value = "This is the first SHEET" //xlApp.activeworkbook.worksheets[2].cells(1,1 ).Value = "This is the second sheet" //xlApp.activeworkbook.worksheets[3].cells(1,1).Value = "This is the third SHEET" //By specifying parameter 1 in worksheets[1] , 2, 3 to set to different sheets can be //xlApp.activeworkbook.SaveAs(ls_file, 39) //Close xlBook.Close() xlApp.Application.quit() xlApp.DisconnectObject() Destroy xlApp MessageBox("Warning",'Excel file successfully Export!!') SetPointer(Arrow!) end event type dw_data from datawindow within w_main integer x = 18 integer y = 12 integer width = 2592 integer height = 1192 integer taborder = 20 string title = "none" string dataobject = "d_departments" boolean hscrollbar = true boolean vscrollbar = true boolean livescroll = true borderstyle borderstyle = stylelowered! end type type cb_import from commandbutton within w_main integer x = 78 integer y = 1260 integer width = 402 integer height = 112 integer taborder = 10 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Import" end type event clicked;oleobject xlApp, xlBook, xlSheet Integer net , ll_value , ll_return , ll_error_cnt ,ll_error_cnt1 String ls_file, ls_name, ls_txt_file Long ll_ins_row Long ll_tot_Row , ll_tot_col , ll_row, ll_col Long ll_department_id , ll_manager_id,ll_location_id String ls_depart_name String ls_Coltype, ls_colname // Initialize the variable SetPointer (HourGlass!) dw_data.Reset() ll_error_cnt = 0 ll_error_cnt1 = 0 //Get the path and file name to save ll_value = GetFileSaveName("Select Excel File", ls_file, ls_name, "xls;xlsx" , "Excel Files (*.xls;*.xlsx),*.xls*;*.xlsx, All Files (*.*),*.*") If ll_value = 1 Then If FileExists ( ls_file ) Then Else MessageBox("Warning", "No Excel file to upload.!!") Return End If Else Return; End If // Using Excel OLE xlApp = Create oleobject ll_return = xlApp.ConnectToNewObject( "excel.application" ) If ll_return < 0 Then MessageBox("An error occurred when connecting to Excel..~r~n Check if Excel is installed on your computer..!",String(ll_return)) SetPointer(Arrow!) Return End If //Open Excel xlApp.Application.Visible = False xlApp.Workbooks.Open(ls_file) xlBook = xlApp.Application.WorkBooks(1) xlSheet = xlBook.Worksheets(1) // total row col count ll_tot_Row = xlApp.ActiveSheet.UsedRange.Rows.Count //Total rows of excel to upload ll_tot_col = xlApp.ActiveSheet.UsedRange.Columns.Count //Total columns of exe to upload If ll_tot_col = 4 Then dw_data.DataObject = "d_departments" ElseIf ll_tot_col = 12 Then dw_data.DataObject = "d_employees" Else MessageBox("Warning", "File invalid department") Return End If If ll_tot_col = 4 Then //departments basic read/wirte datawindow column //For ll_row = 2 To ll_tot_Row + 1 //If head exists in Excel, it starts from 2. For ll_row = 2 To ll_tot_Row ll_department_id = Long(xlSheet.cells(ll_row,1).Value) ls_depart_name = String(xlSheet.cells(ll_row,2).Value) ll_manager_id = Long(xlSheet.cells(ll_row,3).Value) ll_location_id = Long(xlSheet.cells(ll_row,4).Value) If ll_department_id = 0 Then MessageBox("Warning",'There is an invalid department id in the format.') Exit End If If Trim(ls_depart_name) = '' Or IsNull(ls_depart_name) Then MessageBox("Warning","There is an invalid department name is null") Exit End If ll_ins_row = dw_data.InsertRow(0) dw_data.Object.department_id[ll_ins_row] = ll_department_id dw_data.Object.depart_name[ll_ins_row] = ls_depart_name dw_data.Object.manager_id[ll_ins_row] = ll_manager_id dw_data.Object.location_id[ll_ins_row] = ll_location_id Next ElseIf ll_tot_col = 12 Then //dynamic read/wirte datawindow column For ll_row = 2 To ll_tot_Row ll_ins_row = dw_data.InsertRow(0) For ll_col = 1 To ll_tot_col ls_colname = dw_data.Describe ("#"+String(ll_col)+".name") ls_Coltype = dw_data.Describe (ls_colname+".Coltype") If left(Lower(ls_Coltype),4) = "char" Then dw_data.Object.Data[ll_ins_row,ll_col] = String( xlSheet.cells(ll_row,ll_col).Value) Else dw_data.Object.Data[ll_ins_row,ll_col] = Dec( xlSheet.cells(ll_row,ll_col).Value) End If Next Next End If //Close Excel xlApp.Application.Quit xlApp.DisconnectObject() Destroy xlSheet Destroy xlBook Destroy xlApp MessageBox("Warning",'Excel file successfully uploaded!!') SetPointer(Arrow!) end event |
datawindow d_employees
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
release 10.5; datawindow(units=0 timer_interval=0 color=67108864 processing=1 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes print.preview.outline=yes hidegrayline=no grid.lines=0 ) header(height=80 color="536870912" ) summary(height=0 color="536870912" ) footer(height=0 color="536870912" ) detail(height=80 color="536870912" ) table(column=(type=number updatewhereclause=yes name=employee_id dbname="employee_id" ) column=(type=char(100) updatewhereclause=yes name=first_name dbname="first_name" ) column=(type=char(100) updatewhereclause=yes name=last_name dbname="last_name" ) column=(type=char(100) updatewhereclause=yes name=email dbname="email" ) column=(type=char(100) updatewhereclause=yes name=phone_number dbname="phone_number" ) column=(type=char(100) updatewhereclause=yes name=hire_date dbname="hire_date" ) column=(type=char(100) updatewhereclause=yes name=job_id dbname="job_id" ) column=(type=number updatewhereclause=yes name=salary dbname="salary" ) column=(type=number updatewhereclause=yes name=commission_pct dbname="commission_pct" ) column=(type=number updatewhereclause=yes name=manager_id dbname="manager_id" ) column=(type=number updatewhereclause=yes name=department_id dbname="department_id" ) column=(type=number updatewhereclause=yes name=avg_salary dbname="Avg_Salary" ) ) text(band=header alignment="2" text="Employee Id" border="6" color="33554432" x="114" y="4" height="68" width="393" html.valueishtml="0" name=employee_id_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="First Name" border="6" color="33554432" x="521" y="4" height="68" width="672" html.valueishtml="0" name=first_name_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Last Name" border="6" color="33554432" x="1207" y="4" height="68" width="649" html.valueishtml="0" name=last_name_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Email" border="6" color="33554432" x="1870" y="4" height="68" width="923" html.valueishtml="0" name=email_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Phone Number" border="6" color="33554432" x="2807" y="4" height="68" width="695" html.valueishtml="0" name=phone_number_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Hire Date" border="6" color="33554432" x="3515" y="4" height="68" width="457" html.valueishtml="0" name=hire_date_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Job Id" border="6" color="33554432" x="3986" y="4" height="68" width="430" html.valueishtml="0" name=job_id_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Salary" border="6" color="33554432" x="4430" y="4" height="68" width="219" html.valueishtml="0" name=salary_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Commission Pct" border="6" color="33554432" x="4663" y="4" height="68" width="416" html.valueishtml="0" name=commission_pct_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Manager Id" border="6" color="33554432" x="5093" y="4" height="68" width="311" html.valueishtml="0" name=manager_id_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Department Id" border="6" color="33554432" x="5417" y="4" height="68" width="379" html.valueishtml="0" name=department_id_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Avg Salary" border="6" color="33554432" x="5810" y="4" height="68" width="293" html.valueishtml="0" name=avg_salary_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) column(band=detail id=1 alignment="1" tabsequence=10 border="0" color="33554432" x="114" y="4" height="68" width="393" format="[general]" html.valueishtml="0" name=employee_id visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=2 alignment="0" tabsequence=20 border="0" color="33554432" x="521" y="4" height="68" width="672" format="[general]" html.valueishtml="0" name=first_name visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=3 alignment="0" tabsequence=30 border="0" color="33554432" x="1207" y="4" height="68" width="649" format="[general]" html.valueishtml="0" name=last_name visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=4 alignment="0" tabsequence=40 border="0" color="33554432" x="1870" y="4" height="68" width="923" format="[general]" html.valueishtml="0" name=email visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=5 alignment="0" tabsequence=50 border="0" color="33554432" x="2807" y="4" height="68" width="695" format="[general]" html.valueishtml="0" name=phone_number visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=6 alignment="0" tabsequence=60 border="0" color="33554432" x="3515" y="4" height="68" width="457" format="[general]" html.valueishtml="0" name=hire_date visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=7 alignment="0" tabsequence=70 border="0" color="33554432" x="3986" y="4" height="68" width="430" format="[general]" html.valueishtml="0" name=job_id visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=8 alignment="1" tabsequence=80 border="0" color="33554432" x="4430" y="4" height="68" width="219" format="[general]" html.valueishtml="0" name=salary visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=9 alignment="1" tabsequence=90 border="0" color="33554432" x="4663" y="4" height="68" width="416" format="[general]" html.valueishtml="0" name=commission_pct visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=10 alignment="1" tabsequence=100 border="0" color="33554432" x="5093" y="4" height="68" width="311" format="[general]" html.valueishtml="0" name=manager_id visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=11 alignment="1" tabsequence=110 border="0" color="33554432" x="5417" y="4" height="68" width="379" format="[general]" html.valueishtml="0" name=department_id visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=12 alignment="1" tabsequence=120 border="0" color="33554432" x="5810" y="4" height="68" width="293" format="[general]" html.valueishtml="0" name=avg_salary visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) compute(band=detail alignment="2" expression="GetRow()"border="6" color="33554432" x="5" y="4" height="68" width="96" format="[General]" html.valueishtml="0" name=page_1 visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) compute(band=header alignment="2" expression="RowCount()"border="6" color="33554432" x="5" y="4" height="68" width="96" format="[General]" html.valueishtml="0" name=page_2 visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) htmltable(border="1" ) htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" pagingmethod=0 generatedddwframes="1" ) xhtmlgen() cssgen(sessionspecific="0" ) xmlgen(inline="0" ) xsltgen() jsgen() export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 ) import.xml() export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" ) export.xhtml() |
datawindow d_departments
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
release 10.5; datawindow(units=0 timer_interval=0 color=67108864 processing=1 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes print.preview.outline=yes hidegrayline=no grid.lines=0 ) header(height=80 color="536870912" ) summary(height=0 color="536870912" ) footer(height=0 color="536870912" ) detail(height=84 color="536870912" ) table(column=(type=number updatewhereclause=yes name=department_id dbname="department_id" ) column=(type=char(100) updatewhereclause=yes name=depart_name dbname="depart_name" ) column=(type=number updatewhereclause=yes name=manager_id dbname="manager_id" ) column=(type=number updatewhereclause=yes name=location_id dbname="location_id" ) ) text(band=header alignment="2" text="Department Id" border="6" color="33554432" x="114" y="4" height="68" width="421" html.valueishtml="0" name=department_id_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Depart Name" border="6" color="33554432" x="549" y="4" height="68" width="910" html.valueishtml="0" name=depart_name_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Manager Id" border="6" color="33554432" x="1472" y="4" height="68" width="311" html.valueishtml="0" name=manager_id_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Location Id" border="6" color="33554432" x="1797" y="4" height="68" width="297" html.valueishtml="0" name=location_id_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) compute(band=header alignment="2" expression="RowCount()"border="6" color="33554432" x="5" y="4" height="68" width="96" format="[General]" html.valueishtml="0" name=page_2 visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) column(band=detail id=1 alignment="1" tabsequence=10 border="0" color="33554432" x="114" y="4" height="68" width="421" format="[general]" html.valueishtml="0" name=department_id visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=2 alignment="0" tabsequence=20 border="0" color="33554432" x="549" y="4" height="68" width="910" format="[general]" html.valueishtml="0" name=depart_name visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=3 alignment="1" tabsequence=30 border="0" color="33554432" x="1472" y="4" height="68" width="311" format="[general]" html.valueishtml="0" name=manager_id visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=4 alignment="1" tabsequence=40 border="0" color="33554432" x="1797" y="4" height="68" width="297" format="[general]" html.valueishtml="0" name=location_id visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) compute(band=detail alignment="2" expression="GetRow()"border="6" color="33554432" x="5" y="4" height="68" width="96" format="[General]" html.valueishtml="0" name=page_1 visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) htmltable(border="1" ) htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" pagingmethod=0 generatedddwframes="1" ) xhtmlgen() cssgen(sessionspecific="0" ) xmlgen(inline="0" ) xsltgen() jsgen() export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 ) import.xml() export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" ) export.xhtml() |
Find Projects On Github click here
Excel File Format enumeration click here
Operation OLEObject Excel Command Powerbuilder click here
Good Luck!
Subscribe
Login
0 Comments