Maaf tambahan nih, utk save datawindow ke excel panggil fungtion 
uf_save_dw_as_excel(dw, filename)

kl datastore pakai function uf_save_ds_as_excel()

Semoga membantu

On Tue Jul 19th, 2011 9:38 AM ICT NASRULLAH ARUL wrote:

>thank u bro, di test dulu yah...
>
>
>
>
>________________________________
>Dari: Cah Megelang <[email protected]>
>Kepada: [email protected]
>Terkirim: Sel, 19 Juli, 2011 09:14:58
>Judul: Re: Bls: Trs: [indopb] save to excell with htmltable [1 Attachment]
>
>  
>[Attachment(s) from Cah Megelang included below]
>Monggo yg perlu dw2xls silahkan ambil aja, gratis-tis ... in versi 7, kl mau 
>ke 
>versi atasnya tinggal direbuild aja.
>
>
>
>________________________________
>From: Hermawan Dephe <[email protected]>
>To: [email protected]
>Sent: Tue, July 19, 2011 8:43:37 AM
>Subject: Re: Bls: Trs: [indopb] save to excell with  htmltable
>
>  
>o.. mungkin bs pake dw2xls
>monggo yg punya.... silahkan dishare...
>
>
>NASRULLAH ARUL wrote: 
>  
>>klo lewat excell langsung tampilan report yang di excell tidak sama dengan 
>>yang 
>>ada di datawindow, jadi saya saveas ke htmltable dulu baru ke excell...
>>
>>
>>
>________________________________
>Dari: Afrianto Dulbahri ST. <[email protected]>
>>Kepada: [email protected]
>>Terkirim: Sel, 19 Juli, 2011 08:32:09
>>Judul: Re: Trs: [indopb] save to excell with htmltable
>>
>>
>>Pak Nasrullah,
>> 
>>Kenapa tidak langsung ke Excel saja? 
>> 
>>IF (dw_report.SaveAs(pv_filename,HtmlTable!,False)) <= 0 THEN 
>> 
>>diubah menjadi
>> 
>>IF (dw_report.SaveAs(pv_filename,Excel!,False)) <= 0 THEN
>> 
>>Salam,
>>Afri
>>
>>>>> NASRULLAH ARUL <[email protected]> 7/19/2011 9:23 AM >>>
>>  
>>Master2 pb sekalian, saya mau bertanya, kenapa bila menggunakan versi pb.11.5 
>>waktu save to excell selalu nambah 1 baris di atas header,kadang2 juga 
>>manambah 
>>jumlah kolom, sedangkan bila memakai versi bawaanya yaitu pb.5 tidak 
>>mengalami 
>>kendala demikian, ada yang bisa bantu..!
>>
>>
>>ini contoh scripnya..kira2 ada yang kurang ..
>>
>>
>>OLEObject    oWorkBook
>>OLEObject   oExcel
>>OLEObject  oActiveSheet
>>OleObject  oRange,oRange1,oRange2
>>
>>
>>Long     ll_dwrow,ll_dwcol,ll_dwcolcount,ll_dwrowcount
>>String   ls_columns[],ls_columnname,ls_lastcol
>>Any    lany_value
>>Integer   I,li_rec,li_displaynamestyle_org,li_lastcol
>>Integer   li_maxcols = 256,li_teller
>>
>>
>>IF (dw_report.SaveAs(pv_filename,HtmlTable!,False)) <= 0 THEN
>>This.SetMicrohelp("Error while saving to temporary file .....")
>>RETURN -1
>>END IF
>>
>>
>>IF FileExists(is_filenamecomplete) THEN
>>IF Not FileDelete(is_filenamecomplete) THEN
>> THIS.SetMicrohelp("Error while deleting Target file ...")
>> RETURN -1
>>   END IF
>>END IF
>>
>>
>>oExcel = CREATE OLEObject
>>IF oExcel.ConnectToNewObject("Excel.Application") <> 0 THEN
>> THIS.SetMicrohelp("Error while connecting to Excel ...")
>>  f_error('A',67,'"Could Not Connect To Excel"','','')
>>  RETURN -1
>>END IF
>>
>>
>>oExcel.Application.Visible = TRUE 
>>
>>
>>oWorkBook = CREATE OleObject
>>THIS.SetMicrohelp("Opening Temporary File ...")
>>oWorkBook = oExcel.Workbooks.OPEN(pv_filename)
>>
>>
>>THIS.SetMicrohelp("Saving As Excel Workbook ...")
>>//oWorkBook.SaveAs(is_filenamecomplete,-4143) 
>>oWorkBook.SaveAs(pv_filename,-4143) 
>>
>>
>>FileDelete(pv_filename)
>>
>>
>>oActiveSheet = CREATE OleObject
>>oActiveSheet = oWorkBook.ActiveSheet
>>
>>
>>//oActiveSheet = oWorkBook.Worksheets.Add
>>
>>
>>THIS.SetMicrohelp("Applying Lay-out ...")
>>
>>
>>oActiveSheet.Cells.SELECT
>>oExcel.Selection.MergeCells = FALSE
>>oExcel.Selection.Wraptext = FALSE
>>oExcel.Selection.Columns.Autofit()
>>
>>
>>//oActiveSheet.Rows("1:1").SELECT
>>oRange = CREATE OleObject
>>oRange = oExcel.Selection
>>//oRange.DELETE(-4162) 
>>
>>
>>oRange1 = CREATE OleObject
>>oRange2 = CREATE OleObject
>>
>>
>>SetNull(ls_lastcol)
>>
>>
>>//oExcel.Application.Cells(1,1).value = 24
>>
>>
>>
>>
>>//FOR I = 255 TO 1 STEP -1
>>//IF NOT IsNull(oExcel.Application.Cells(1,I).Value) THEN
>>//ls_lastcol = String(oExcel.ActiveSheet.Cells(1,I).Value)
>>//EXIT
>>//END IF
>>//NEXT
>>
>>
>>I = 1
>>
>>
>>DO WHILE TRUE AND NOT IsNull(ls_lastcol)  //AND NOT dw_xls.ib_isfreeform
>>oWorkBook.Save()
>>li_teller ++
>>IF li_teller > li_maxcols THEN
>>EXIT
>>END IF
>>//lany_value = oExcel.Cells(1,I).Value
>>//
>>//IF IsNull(lany_value) THEN
>>// oActiveSheet.Cells(1,I).SELECT
>>// oRange1 = oExcel.Selection
>>//
>>// oActiveSheet.Cells(65536,I).SELECT
>>// oRange2 = oExcel.Selection
>>//
>>// oActiveSheet.Range(oRange1,oRange2).SELECT
>>// oRange = oExcel.Selection
>>// 
>>// oRange.DELETE
>>// ELSE
>>//If String(lany_value) <> ls_lastcol Then
>>//I = I + 1
>>//ELSE
>>//EXIT
>>// END IF
>>// END IF
>>LOOP
>>
>>
>>oActiveSheet.Cells.Select
>>oExcel.Selection.Wraptext = False
>>oExcel.Selection.Columns.Autofit()
>>oExcel.Selection.Rows.Autofit()
>>//oActiveSheet.Cells(1,1).Select
>>
>>
>>oRange1.DisconnectObject()
>>DESTROY oRange1
>>
>>
>>oRange2.DisconnectObject()
>>DESTROY oRange2
>>
>>
>>oRange.DisconnectObject()
>>DESTROY oRange
>>
>>
>>oActiveSheet.DisconnectObject()
>>DESTROY oActiveSheet
>>
>>
>>oWorkBook.Save()
>>oWorkBook.Close(True)
>>oWorkBook.DisconnectObject()
>>DESTROY oWorkBook
>>
>>
>>oExcel.Quit
>>oExcel.DisConnectObject()
>>DESTROY oExcel
>>
>>
>>SetPointer(Arrow!)
>>THIS.SetMicrohelp("Retrieving, please wait ..!")
>>
>>
>>RETURN 100
>
> 


------------------------------------

-----------------------------------------------
IndoPB - Indonesia PB User Group 
http://groups.yahoo.com/group/indopbYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indopb/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/indopb/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Kirim email ke