Home > database >  Don't enter extel setting (when the data is zero output)
Don't enter extel setting (when the data is zero output)

Time:09-28

Want excuse me I have a dw is placed into the shipment to enter into extel

There dw column bar code, name, date, shipments, amount of shipment, shipment plan...

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

The following is my into extel code (because the code is much, first briefly... )

INT ret, c
Oleobject xlApp/Excel/statement application objects
XlApp=Create OLEObject
OLEObject obook3, xlsub4
Ret=xlApp. ConnectToNewObject (" Excel Sheet ")//open the automation object
C=1
String ls_file3
Ls_file3="C: \ e1. XLS"
Obook3=xlApp. Application. Workbooks. Open (ls_file3)//Open the file
Xlsub4=xlapp. Application. ActiveWorkbook. Worksheets [1]//activation of the first page
Xlapp. Application. The visible=true
PPC=dw_2. ROWCOUNT ()
Xlsub4. Cells [1] Value=https://bbs.csdn.net/topics/sle_5.text
Xlsub4. Cells [1, 2]. Value=https://bbs.csdn.net/topics/sle_6.text
Xlsub4. Cells [2] Value=https://bbs.csdn.net/topics/sle_3.text
Xlsub4. Cells [2, 3]. Value=https://bbs.csdn.net/topics/sle_4.text
Xlsub4. Cells [3, 2]. Value=https://bbs.csdn.net/topics/sle_10.text
Xlsub4. Cells [3, 3]. Value=https://bbs.csdn.net/topics/sle_9.text


Long combined
Total=0
For c=1 to PPC
Xlsub4. Cells [c + 6, 1] Value=https://bbs.csdn.net/topics/string (c)
Xlsub4. Cells [c + 6, 2]. Value=https://bbs.csdn.net/topics/string (dw_2. Getitemstring (c, "bar code"))
Xlsub4. Cells [c + 6, 3] Value=https://bbs.csdn.net/topics/string (dw_2. Getitemstring (c, "name"))
Xlsub4. Cells + 6, 4 [c]. Value=https://bbs.csdn.net/topics/string (date (dw_2. Getitemdate (c, "term"), "yyyy/mm/dd")
Xlsub4. Cells (c + 6, 5). The Value=https://bbs.csdn.net/topics/string (dw_2. Getitemstring (c, "shipments"))
Xlsub4. Cells [c + 6, 6] Value=https://bbs.csdn.net/topics/string (dw_2. Getitemstring (c, "the cost"))
Xlsub4. Cells [c + 6, 7] Value=https://bbs.csdn.net/topics/string (dw_2. Getitemstring (c, "delivery plan"))


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Because sometimes the shipment number is 0 (because according to the order with each other)

So you can make shipment number 0 product print barcode don't?? As long as printed above 0 shipments


For example: the current shipment extel

Bar code name period shipments out cost subtotal
A100 screw, 01, 2015-01-01, 1000 to 10 10000
A154 screw 45 2011-01-25 300 8 2400
B612 nut 0000-00-01 00 0 8 0
B621 nut 05 0000-00-00 0 3 0
A177 screw 22 2011-11-02 300 8 2400
.

This will print out the shipments items 0

Can be set to only print out have shipped items such as the following way

Bar code name period shipments out cost subtotal
A100 screw, 01, 2015-01-01, 1000 to 10 10000
A154 screw 45 2011-01-25 300 8 2400
A177 screw 22 2011-11-02 300 8 2400
.
.

How to set the grammar thank you, please

CodePudding user response:

Suggestions regeneration into a DW, or export filter before,

CodePudding user response:

Before export data of the DW data filtering,

Dw. Setfilter (' shipments & gt; 0 ')
Dw. The filter ()

  • Related