ebay商品基本属性组合成数据表格式,可用上传到系统递交数据

该刊登表设计是利用VB写的,当时因为两个系统的数据不能直接对接,又copy并且组合SKU,一个表格一个表格填写,比较麻烦,还好刊登系统可以允许用excel表格上传数据

所以就下好模板,学了VB语言,在业余的时候做了这个数据自动组合功能用刊登数据广告。

另外也使用VB写了一个excel表格几千行数据的处理(这个另做解释)

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

关于SKU刊登功能如下:
(图文与代码)从basic表提取数据 判断数据并组装好,填写在export表上面的格式,就可以上传到系统后台的,这样在产品刊登上可以节省很多时间(总共有106列,但最重要的是SKU和属性的组合);

关键代码:

Sub E_US刊登模板0420()

        ‘basic表单参数

    With Sheets("basic")

    basic_cnt = .Range("a63556").End(xlUp).Row

    basic_i = 2

    ‘export-20130124表格的起始点,用j来递增多属性,完成后返还给i;

    i = 3

    Do While basic_i <= basic_cnt

        basic_sku = .Cells(basic_i, "a")
        basic_site = .Cells(basic_i, "b")
        basic_price = .Cells(basic_i, "c")
        basic_ismult = .Cells(basic_i, "d")
        basic_mv1_code = .Cells(basic_i, "e")
        basic_mv1_att = .Cells(basic_i, "f")
        basic_mv1_val = .Cells(basic_i, "g")
        basic_mv2_code = .Cells(basic_i, "h")
        basic_mv2_att = .Cells(basic_i, "i")
        basic_mv2_val = .Cells(basic_i, "j")
        basic_mv3_code = .Cells(basic_i, "k")
        basic_mv3_att = .Cells(basic_i, "l")
        basic_mv3_val = .Cells(basic_i, "m")
        basic_title = .Cells(basic_i, "n")
        basic_description = .Cells(basic_i, "o")
        basic_ebay_cat1 = .Cells(basic_i, "p")
        basic_ebay_cat2 = .Cells(basic_i, "q")
        basic_item_spec4 = .Cells(basic_i, "r")
        basic_item_spec5 = .Cells(basic_i, "s")
        basic_item_spec6 = .Cells(basic_i, "t")
        basic_item_spec7 = .Cells(basic_i, "u")
        basic_item_spec8 = .Cells(basic_i, "v")
        basic_item_spec9 = .Cells(basic_i, "w")
        basic_item_spec10 = .Cells(basic_i, "x")
        basic_item_spec11 = .Cells(basic_i, "y")
        basic_item_spec12 = .Cells(basic_i, "z")
        basic_item_spec13 = .Cells(basic_i, "aa")
        basic_item_spec14 = .Cells(basic_i, "ab")
        basic_item_spec15 = .Cells(basic_i, "ac")
        basic_photo = .Cells(basic_i, "ad")

        ‘j来引导下一个多属性
        j = i

        ‘----------------------------
        ‘数据表列号
        dsheet_row_id = "A"
        dsheet_shop_initial = "B"
        dsheet_sitecode = "C"
        dsheet_currency = "D"
        dsheet_format = "E"
        dsheet_duration = "F"
        dsheet_var_parent_sku = "G"
        dsheet_product_code = "H"
        dsheet_remark = "I"
        dsheet_var_photo = "J"
        dsheet_var_child_var1 = "K"
        dsheet_var_child_var2 = "L"
        dsheet_var_child_var3 = "M"
        dsheet_var_child_var4 = "N"
        dsheet_var_child_var5 = "O"
        dsheet_var_ean = "P"
        dsheet_var_upc = "Q"
        dsheet_var_isbn = "R"
        dsheet_lot_size = "S"
        dsheet_qty = "T"
        dsheet_price = "U"
        dsheet_discount_profileid = "V"
        dsheet_isoffer = "W"
        dsheet_rejectamt = "X"
        dsheet_acceptamt = "Y"
        dsheet_payment_method = "Z"
        dsheet_paypal_email = "AA"
        dsheet_autopay = "AB"
        dsheet_checkout_policy = "AC"
        dsheet_itemcountry = "AD"
        dsheet_itemlocation = "AE"
        dsheet_ship_to_country = "AF"
        dsheet_exclude_shiptolocation = "AG"
        dsheet_ship_service = "AH"
        dsheet_first_post = "AI"
        dsheet_second_post = "AJ"
        dsheet_intl_ship_service = "AK"
        dsheet_intl_ship_location = "AL"
        dsheet_intl_first_post = "AM"
        dsheet_intl_second_post = "AN"
        dsheet_max_dispatch_time = "AO"
        dsheet_return_accepted = "AP"
        dsheet_return_refund = "AQ"
        dsheet_return_within = "AR"
        dsheet_return_shipby = "AS"
        dsheet_return_policy = "AT"
        dsheet_productsize = "AU"
        dsheet_receivedesc1 = "AV"
        dsheet_receivedesc2 = "AW"
        dsheet_receivedesc3 = "AX"
        dsheet_receivedesc4 = "AY"
        dsheet_receivedesc5 = "AZ"
        dsheet_maindesc01 = "BA"
        dsheet_maindesc02 = "BB"
        dsheet_maindesc03 = "BC"
        dsheet_maindesc04 = "BD"
        dsheet_maindesc05 = "BE"
        dsheet_maindesc06 = "BF"
        dsheet_maindesc07 = "BG"
        dsheet_maindesc08 = "BH"
        dsheet_maindesc09 = "BI"
        dsheet_maindesc10 = "BJ"
        dsheet_pictotal = "BK"
        dsheet_poster = "BL"
        dsheet_poster_link = "BM"
        dsheet_gallery = "BN"
        dsheet_gallerytype = "BO"
        dsheet_photofirst = "BP"
        dsheet_pic_use_actual_path = "BQ"
        dsheet_desc_use_actual_html = "BR"
        dsheet_cmptblty_use_profile = "BS"
        dsheet_pic_actual_paths = "BT"
        dsheet_condition_id = "BU"
        dsheet_condition_desc = "BV"
        dsheet_ebcategory = "BW"
        dsheet_ebcategory2 = "BX"
        dsheet_shopcategory1 = "BY"
        dsheet_shopcategory2 = "BZ"
        dsheet_sitecategory = "CA"
        dsheet_titleexternal = "CB"
        dsheet_subtitleexternal = "CC"
        dsheet_titleinternal = "CD"
        dsheet_item_specific_1 = "CE"
        dsheet_item_specific_2 = "CF"
        dsheet_item_specific_3 = "CG"
        dsheet_item_specific_4 = "CH"
        dsheet_item_specific_5 = "CI"
        dsheet_item_specific_6 = "CJ"
        dsheet_item_specific_7 = "CK"
        dsheet_item_specific_8 = "CL"
        dsheet_item_specific_9 = "CM"
        dsheet_item_specific_10 = "CN"
        dsheet_item_specific_11 = "CO"
        dsheet_item_specific_12 = "CP"
        dsheet_item_specific_13 = "CQ"
        dsheet_item_specific_14 = "CR"
        dsheet_item_specific_15 = "CS"
        dsheet_catalog_type = "CT"
        dsheet_catalog_id = "CU"
        dsheet_catalog_use_photo = "CV"
        dsheet_catalog_use_specific = "CW"
        dsheet_profile_idx = "CX"
        dsheet_cmptblty_profile_idx = "CY"
        dsheet_template_idx = "CZ"
        dsheet_attr_group = "DA"
        dsheet_privatelisting = "DB"
        dsheet_listenhancement = "DC"
        dsheet_keep_enabled = "DD"
        dsheet_EOF = "DE"

        ‘-----------------------------------------------
        ‘E_US站点参数

            Cells(i, dsheet_row_id) = ""
            Cells(i, dsheet_shop_initial) = "e"
            Cells(i, dsheet_sitecode) = "US"
            Cells(i, dsheet_currency) = "USD"
            Cells(i, dsheet_format) = "BIN"
            Cells(i, dsheet_duration) = "GTC"

            If basic_ismult = 1 Then

                arr_mv1_cod = Split(basic_mv1_code, ",")

                len_mv1_cod = UBound(arr_mv1_cod)

                arr_mv1_val = Split(basic_mv1_val, ",")

                len_mv1_val = UBound(arr_mv1_val)

                If Trim(basic_mv3_val = "") Then

                    ‘判断单SKU和单属性值
                    If Trim(basic_mv2_val = "") Then

                        If len_mv1_cod = len_mv1_val Then

                            For mv1_i = 0 To len_mv1_cod

                                Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"

                                Cells(j, dsheet_product_code) = basic_sku & "-" & UCase(arr_mv1_cod(mv1_i)) & "/120129eusd"

                                If arr_mv1_val(mv1_i) Like "x*" Then

                                    Cells(j, dsheet_var_child_var1) = Application.Proper(basic_mv1_att) & ":" & UCase(arr_mv1_val(mv1_i))

                                Else

                                    Cells(j, dsheet_var_child_var1) = Application.Proper(basic_mv1_att & ":" & arr_mv1_val(mv1_i))

                                End If

                                Cells(j, dsheet_var_upc) = "Does not apply"

                                Cells(j, dsheet_lot_size) = 1

                                Cells(j, dsheet_qty) = 15

                                Cells(j, dsheet_price) = basic_price

                                Cells(j, dsheet_EOF) = "o"

                                j = j + 1

                            Next

                        Else

                         MsgBox (basic_i & "row:length of mv1_code and mv1_val not same")

                         Exit Sub

                        End If

                    ‘判断单SKU双属性值,或者双SKU双属性值
                    Else

                    arr_mv2_val = Split(basic_mv2_val, ",")

                    len_mv2_val = UBound(arr_mv2_val)

                        ‘判断单SKU双属性值

                        If Trim(basic_mv2_code) = "" Then

                            If (len_mv1_cod + 1) = (len_mv1_val + 1) * (len_mv2_val + 1) Then

                                ‘使用mv_k定位循环双属性值

                                mv_k = j

‘*****************************循环SKU编号

                            For mv1code_i = 0 To len_mv1_cod

                                Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"

                                Cells(j, dsheet_product_code) = basic_sku & "-" & arr_mv1_cod(mv1code_i) & "/120129eusd"

                                Cells(j, dsheet_var_upc) = "Does not apply"

                                Cells(j, dsheet_lot_size) = 1

                                Cells(j, dsheet_qty) = 15

                                Cells(j, dsheet_price) = basic_price

                                Cells(j, dsheet_EOF) = "o"

                                j = j + 1

                            Next

                                For len_mv1val_i = 0 To len_mv1_val

                                    For len_mv2val_i = 0 To len_mv2_val

                                        ‘判断属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写

                                        If arr_mv1_val(len_mv1val_i) Like "x*" Then

                                            Cells(mv_k, dsheet_var_child_var1) = Application.Proper(basic_mv1_att) & ":" & UCase(arr_mv1_val(len_mv1val_i))

                                        Else

                                            Cells(mv_k, dsheet_var_child_var1) = Application.Proper(basic_mv1_att & ":" & arr_mv1_val(len_mv1val_i))

                                        End If

                                        ‘判断属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写

                                        If arr_mv2_val(len_mv2val_i) Like "x*" Then

                                            Cells(mv_k, dsheet_var_child_var2) = Application.Proper(basic_mv2_att) & ":" & UCase(arr_mv2_val(len_mv2val_i))

                                        Else

                                            Cells(mv_k, dsheet_var_child_var2) = Application.Proper(basic_mv2_att & ":" & arr_mv2_val(len_mv2val_i))

                                        End If

                                        mv_k = mv_k + 1

                                    Next

                                Next

                            Else

                                MsgBox (basic_i & "row:len_mv1_cod!=len_mv1_val*len_mv2_val")

                                Exit Sub

                            End If

                        ‘双SKU双属性值
                        Else

                            arr_mv2_cod = Split(basic_mv2_code, ",")

                            len_mv2_cod = UBound(arr_mv2_cod)

                            If len_mv1_cod <> len_mv1_val Then

                                MsgBox (basic_i & "row:2/2 mode len_mv1_cod!=len_mv1_val")

                                Exit Sub

                            End If

                            If len_mv2_cod <> len_mv2_val Then

                                MsgBox (basic_i & "row:2/2 mode len_mv2_cod!=len_mv2_val")

                                Exit Sub

                            End If

                            ‘循环双SKU和双属性

                            For mv1val_i = 0 To len_mv1_val

                                For mv2val_i = 0 To len_mv2_val

                                    Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"

                                    Cells(j, dsheet_product_code) = basic_sku & "-" & UCase(arr_mv1_cod(mv1val_i)) & UCase(arr_mv2_cod(mv2val_i)) & "/120129eusd"

                                    ‘判断MV1属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写

                                    If arr_mv1_val(mv1val_i) Like "x*" Then

                                        Cells(j, dsheet_var_child_var1) = Application.Proper(basic_mv1_att) & ":" & UCase(arr_mv1_val(mv1val_i))

                                    Else

                                        Cells(j, dsheet_var_child_var1) = Application.Proper(basic_mv1_att & ":" & arr_mv1_val(mv1val_i))

                                    End If

                                    ‘判断MV2属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写

                                    If arr_mv2_val(mv2val_i) Like "x*" Then

                                        Cells(j, dsheet_var_child_var2) = Application.Proper(basic_mv2_att) & ":" & UCase(arr_mv2_val(mv2val_i))

                                    Else

                                        Cells(j, dsheet_var_child_var2) = Application.Proper(basic_mv2_att & ":" & arr_mv2_val(mv2val_i))

                                    End If

                                    Cells(j, dsheet_var_upc) = "Does not apply"

                                    Cells(j, dsheet_lot_size) = 1

                                    Cells(j, dsheet_qty) = 15

                                    Cells(j, dsheet_price) = basic_price

                                    Cells(j, dsheet_EOF) = "o"

                                    j = j + 1

                                Next

                            Next

                        End If

                    End If
‘**********************************************************
                Else

                    ‘先获取mv3的值

                    arr_mv3_val = Split(basic_mv3_val, ",")

                    len_mv3_val = UBound(arr_mv3_val)

                    arr_mv2_val = Split(basic_mv2_val, ",")

                    len_mv2_val = UBound(arr_mv2_val)

                    ‘判断双SKU,三属性值

                    If basic_mv2_code <> "" And basic_mv3_code = "" Then

                        arr_mv2_cod = Split(basic_mv2_code, ",")

                        len_mv2_cod = UBound(arr_mv2_cod)

                        If (len_mv1_cod + 1) * (len_mv2_cod + 1) = (len_mv1_val + 1) * (len_mv2_val + 1) * (len_mv3_val + 1) Then

                            mv_k3 = j

                            For mv1code_i = 0 To len_mv1_cod

                                For mv2code_i = 0 To len_mv2_cod

                                    Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"

                                    Cells(j, dsheet_product_code) = basic_sku & "-" & UCase(arr_mv1_cod(mv1code_i)) & UCase(arr_mv2_cod(mv2code_i)) & "/120129eusd"

                                    Cells(j, dsheet_var_upc) = "Does not apply"

                                    Cells(j, dsheet_lot_size) = 1

                                    Cells(j, dsheet_qty) = 15

                                    Cells(j, dsheet_price) = basic_price

                                    Cells(j, dsheet_EOF) = "o"

                                    j = j + 1

                                Next

                            Next

                            For mv1val_i = 0 To len_mv1_val

                                For mv2val_i = 0 To len_mv2_val

                                    For mv3val_i = 0 To len_mv3_val

                                         ‘判断MV1属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写

                                        If arr_mv1_val(mv1val_i) Like "x*" Then

                                            Cells(mv_k3, dsheet_var_child_var1) = Application.Proper(basic_mv1_att) & ":" & UCase(arr_mv1_val(mv1val_i))

                                        Else

                                            Cells(mv_k3, dsheet_var_child_var1) = Application.Proper(basic_mv1_att & ":" & arr_mv1_val(mv1val_i))

                                        End If

                                        ‘判断MV2属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写

                                        If arr_mv2_val(mv2val_i) Like "x*" Then

                                            Cells(mv_k3, dsheet_var_child_var2) = Application.Proper(basic_mv2_att) & ":" & UCase(arr_mv2_val(mv2val_i))

                                        Else

                                            Cells(mv_k3, dsheet_var_child_var2) = Application.Proper(basic_mv2_att & ":" & arr_mv2_val(mv2val_i))

                                        End If

                                        ‘判断MV3属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写

                                        If arr_mv3_val(mv3val_i) Like "x*" Then

                                            Cells(mv_k3, dsheet_var_child_var3) = Application.Proper(basic_mv3_att) & ":" & UCase(arr_mv3_val(mv3val_i))

                                        Else

                                            Cells(mv_k3, dsheet_var_child_var3) = Application.Proper(basic_mv3_att & ":" & arr_mv3_val(mv3val_i))

                                        End If

                                        mv_k3 = mv_k3 + 1

                                    Next

                                Next

                            Next
                        Else

                            MsgBox (basic_i & "row:2SKU/3colum len_cod!=len_val")

                            Exit Sub

                        End If

                    ‘判断单SKU,三属性值

                    ElseIf basic_mv2_code = "" And basic_mv3_code = "" Then

                        If (len_mv1_cod + 1) = (len_mv1_val + 1) * (len_mv2_val + 1) * (len_mv3_val + 1) Then

                            mv_k3 = j

                            For mv1code_i = 0 To len_mv1_cod

                                Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"

                                Cells(j, dsheet_product_code) = basic_sku & "-" & UCase(arr_mv1_cod(mv1code_i)) & "/120129eusd"

                                Cells(j, dsheet_var_upc) = "Does not apply"

                                Cells(j, dsheet_lot_size) = 1

                                Cells(j, dsheet_qty) = 15

                                Cells(j, dsheet_price) = basic_price

                                Cells(j, dsheet_EOF) = "o"

                                j = j + 1

                            Next

                            For mv1val_i = 0 To len_mv1_val

                                    For mv2val_i = 0 To len_mv2_val

                                        For mv3val_i = 0 To len_mv3_val

                                             ‘判断MV1属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写

                                            If arr_mv1_val(mv1val_i) Like "x*" Then

                                                Cells(mv_k3, dsheet_var_child_var1) = Application.Proper(basic_mv1_att) & ":" & UCase(arr_mv1_val(mv1val_i))

                                            Else

                                                Cells(mv_k3, dsheet_var_child_var1) = Application.Proper(basic_mv1_att & ":" & arr_mv1_val(mv1val_i))

                                            End If

                                            ‘判断MV2属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写

                                            If arr_mv2_val(mv2val_i) Like "x*" Then

                                                Cells(mv_k3, dsheet_var_child_var2) = Application.Proper(basic_mv2_att) & ":" & UCase(arr_mv2_val(mv2val_i))

                                            Else

                                                Cells(mv_k3, dsheet_var_child_var2) = Application.Proper(basic_mv2_att & ":" & arr_mv2_val(mv2val_i))

                                            End If

                                            ‘判断MV3属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                            If arr_mv3_val(mv3val_i) Like "x*" Then

                                                Cells(mv_k3, dsheet_var_child_var3) = Application.Proper(basic_mv3_att) & ":" & UCase(arr_mv3_val(mv3val_i))

                                            Else

                                                Cells(mv_k3, dsheet_var_child_var3) = Application.Proper(basic_mv3_att & ":" & arr_mv3_val(mv3val_i))

                                            End If

                                            mv_k3 = mv_k3 + 1

                                        Next

                                    Next

                                Next

                            Else

                                MsgBox (basic_i & "row:1SKU/3colum len_cod!=len_val")

                                Exit Sub

                            End If

                    ‘判断三SKU,三属性值

                    ElseIf basic_mv2_code <> "" And basic_mv3_code <> "" Then

                        arr_mv2_cod = Split(basic_mv2_code, ",")

                        len_mv2_cod = UBound(arr_mv2_cod)

                        arr_mv3_cod = Split(basic_mv3_code, ",")

                        len_mv3_cod = UBound(arr_mv3_cod)

                        If len_mv1_cod <> len_mv1_val Then

                                MsgBox (basic_i & "row:3/3 mode len_mv1_cod!=len_mv1_val")

                                Exit Sub

                            End If

                        If len_mv2_cod <> len_mv2_val Then

                            MsgBox (basic_i & "row:3/3 mode len_mv2_cod!=len_mv2_val")

                            Exit Sub

                        End If

                        If len_mv3_cod <> len_mv3_val Then

                            MsgBox (basic_i & "row:3/3 mode len_mv3_cod!=len_mv3_val")

                            Exit Sub

                        End If

                        ‘循环三属性

                        For mv1val_i = 0 To len_mv1_val

                                For mv2val_i = 0 To len_mv2_val

                                    For mv3val_i = 0 To len_mv3_val

                                        Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"

                                        Cells(j, dsheet_product_code) = basic_sku & "-" & UCase(arr_mv1_cod(mv1val_i)) & UCase(arr_mv2_cod(mv2val_i)) & UCase(arr_mv3_cod(mv3val_i)) & "/120129eusd"

                                         ‘判断MV1属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写

                                        If arr_mv1_val(mv1val_i) Like "x*" Then

                                            Cells(j, dsheet_var_child_var1) = Application.Proper(basic_mv1_att) & ":" & UCase(arr_mv1_val(mv1val_i))

                                        Else

                                            Cells(j, dsheet_var_child_var1) = Application.Proper(basic_mv1_att & ":" & arr_mv1_val(mv1val_i))

                                        End If

                                        ‘判断MV2属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写

                                        If arr_mv2_val(mv2val_i) Like "x*" Then

                                            Cells(j, dsheet_var_child_var2) = Application.Proper(basic_mv2_att) & ":" & UCase(arr_mv2_val(mv2val_i))

                                        Else

                                            Cells(j, dsheet_var_child_var2) = Application.Proper(basic_mv2_att & ":" & arr_mv2_val(mv2val_i))

                                        End If

                                        ‘判断MV3属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                        If arr_mv3_val(mv3val_i) Like "x*" Then

                                            Cells(j, dsheet_var_child_var3) = Application.Proper(basic_mv3_att) & ":" & UCase(arr_mv3_val(mv3val_i))

                                        Else

                                            Cells(j, dsheet_var_child_var3) = Application.Proper(basic_mv3_att & ":" & arr_mv3_val(mv3val_i))

                                        End If

                                        Cells(j, dsheet_var_upc) = "Does not apply"

                                        Cells(j, dsheet_lot_size) = 1

                                        Cells(j, dsheet_qty) = 15

                                        Cells(j, dsheet_price) = basic_price

                                        Cells(j, dsheet_EOF) = "o"

                                        j = j + 1

                                    Next

                                Next

                            Next

                    Else

                        MsgBox ("Extra Useless Colum")

                    End If

                End If
‘**************************
            ElseIf basic_ismult = 0 Then

                Cells(j, dsheet_lot_size) = 1

                Cells(j, dsheet_qty) = 15

                Cells(j, dsheet_price) = basic_price

                Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"

                Cells(j, dsheet_product_code) = basic_sku & "/120129eusd-P"

                j = j + 1

            Else

                MsgBox ("ismult error/#N/A")
                Rows(i).Delete
                Exit Sub

            End If

‘            Cells(i, dsheet_remark) = ""
‘            Cells(i, dsheet_var_photo) = ""
‘            Cells(i, dsheet_var_child_var3) = ""
‘            Cells(i, dsheet_var_child_var4) = ""
‘            Cells(i, dsheet_var_child_var5) = ""
‘            Cells(i, dsheet_discount_profileid) = ""
            Cells(i, dsheet_isoffer) = 0
            Cells(i, dsheet_rejectamt) = 0
            Cells(i, dsheet_acceptamt) = 0
            Cells(i, dsheet_payment_method) = "PayPal"

            If Cells(i, dsheet_price) > 4.99 Then

                Cells(i, dsheet_paypal_email) = "[email protected]"

                Cells(i, dsheet_ship_service) = "ePacketChina"

            ElseIf Cells(i, dsheet_price) < 5 And Cells(i, dsheet_price) > 0 Then

                Cells(i, dsheet_ship_service) = "EconomyShippingFromOutsideUS"

                Cells(i, dsheet_paypal_email) = "[email protected]"

            End If

            Cells(i, dsheet_autopay) = 0
‘            Cells(i, dsheet_checkout_policy) = ""
            Cells(i, dsheet_itemcountry) = "CN"
            Cells(i, dsheet_itemlocation) = "Shenzhen"
            Cells(i, dsheet_ship_to_country) = "Worldwide"
‘            Cells(i, dsheet_exclude_shiptolocation) = ""
            Cells(i, dsheet_first_post) = 0
            Cells(i, dsheet_second_post) = 0
            Cells(i, dsheet_intl_ship_service) = "StandardInternational"
            Cells(i, dsheet_intl_ship_location) = "Worldwide"
            Cells(i, dsheet_intl_first_post) = 0
            Cells(i, dsheet_intl_second_post) = 0
            Cells(i, dsheet_max_dispatch_time) = 2
            Cells(i, dsheet_return_accepted) = "ReturnsAccepted"
            Cells(i, dsheet_return_refund) = "MoneyBackOrExchange"
            Cells(i, dsheet_return_within) = "Days_14"
            Cells(i, dsheet_return_shipby) = "Buyer"
            Cells(i, dsheet_return_policy) = "Restocking fees: No"
‘            Cells(i, dsheet_productsize) = ""
‘            Cells(i, dsheet_receivedesc1) = ""
‘            Cells(i, dsheet_receivedesc2) = ""
‘            Cells(i, dsheet_receivedesc3) = ""
‘            Cells(i, dsheet_receivedesc4) = ""
‘            Cells(i, dsheet_receivedesc5) = ""
            Cells(i, dsheet_maindesc01) = basic_description     ‘产品内容文字描述
‘            Cells(i, dsheet_maindesc02) = ""
‘            Cells(i, dsheet_maindesc03) = ""
‘            Cells(i, dsheet_maindesc04) = ""
‘            Cells(i, dsheet_maindesc05) = ""
‘            Cells(i, dsheet_maindesc06) = ""
‘            Cells(i, dsheet_maindesc07) = ""
‘            Cells(i, dsheet_maindesc08) = ""
‘            Cells(i, dsheet_maindesc09) = ""
‘            Cells(i, dsheet_maindesc10) = ""
            Cells(i, dsheet_pictotal) = 0
‘            Cells(i, dsheet_poster) = ""
‘            Cells(i, dsheet_poster_link) = ""
            Cells(i, dsheet_gallery) = basic_photo
            Cells(i, dsheet_gallerytype) = "Gallery"
‘            Cells(i, dsheet_photofirst) = ""
            Cells(i, dsheet_pic_use_actual_path) = 1
            Cells(i, dsheet_desc_use_actual_html) = 0
            Cells(i, dsheet_cmptblty_use_profile) = 0
‘            Cells(i, dsheet_pic_actual_paths) = ""
            Cells(i, dsheet_condition_id) = 1000
‘            Cells(i, dsheet_condition_desc) = ""
            Cells(i, dsheet_ebcategory) = basic_ebay_cat1
            Cells(i, dsheet_ebcategory2) = basic_ebay_cat2
‘            Cells(i, dsheet_shopcategory1) = basic_shop_cat1
‘            Cells(i, dsheet_shopcategory2) = basic_shop_cat2
‘            Cells(i, dsheet_sitecategory) = ""
            Cells(i, dsheet_titleexternal) = Trim(Replace(basic_title, Chr(10), ""))
‘            Cells(i, dsheet_subtitleexternal) = ""
            Cells(i, dsheet_titleinternal) = Trim(Replace(basic_title, Chr(10), ""))

            Cells(i, dsheet_item_specific_1) = "Brand:Unbranded"
            Cells(i, dsheet_item_specific_2) = "MPN:Does not apply"
            If basic_ismult <> 1 Then Cells(i, dsheet_item_specific_3) = "UPC:Does not apply"
            Cells(i, dsheet_item_specific_4) = Trim(basic_item_spec4)
            Cells(i, dsheet_item_specific_5) = Trim(basic_item_spec5)
            Cells(i, dsheet_item_specific_6) = Trim(basic_item_spec6)
            Cells(i, dsheet_item_specific_7) = Trim(basic_item_spec7)
            Cells(i, dsheet_item_specific_8) = Trim(basic_item_spec8)
            Cells(i, dsheet_item_specific_9) = Trim(basic_item_spec9)
            Cells(i, dsheet_item_specific_10) = Trim(basic_item_spec10)
            Cells(i, dsheet_item_specific_11) = Trim(basic_item_spec11)
            Cells(i, dsheet_item_specific_12) = Trim(basic_item_spec12)
            Cells(i, dsheet_item_specific_13) = Trim(basic_item_spec13)
            Cells(i, dsheet_item_specific_14) = Trim(basic_item_spec14)
            Cells(i, dsheet_item_specific_15) = Trim(basic_item_spec15)
‘            Cells(i, dsheet_catalog_type) = ""
‘            Cells(i, dsheet_catalog_id) = ""
            Cells(i, dsheet_catalog_use_photo) = 0
            Cells(i, dsheet_catalog_use_specific) = 0
‘            Cells(i, dsheet_profile_idx) = ""
‘            Cells(i, dsheet_cmptblty_profile_idx) = ""
            Cells(i, dsheet_template_idx) = 2362
‘            Cells(i, dsheet_attr_group) = ""
            Cells(i, dsheet_privatelisting) = 1
‘            Cells(i, dsheet_listenhancement) = ""
            Cells(i, dsheet_keep_enabled) = 0
            Cells(i, dsheet_EOF) = 0
            i = j

        basic_i = basic_i + 1
    Loop

    End With

End Sub

Sub E_US刊登模板0420()

‘basic表单参数
        
    With Sheets("basic")
    
    basic_cnt = .Range("a63556").End(xlUp).Row
    
    basic_i = 2
    
    ‘export-20130124表格的起始点,用j来递增多属性,完成后返还给i;
    
    i = 3
        
    Do While basic_i <= basic_cnt
        
        
        basic_sku = .Cells(basic_i, "a")
        basic_site = .Cells(basic_i, "b")
        basic_price = .Cells(basic_i, "c")
        basic_ismult = .Cells(basic_i, "d")
        basic_mv1_code = .Cells(basic_i, "e")
        basic_mv1_att = .Cells(basic_i, "f")
        basic_mv1_val = .Cells(basic_i, "g")
        basic_mv2_code = .Cells(basic_i, "h")
        basic_mv2_att = .Cells(basic_i, "i")
        basic_mv2_val = .Cells(basic_i, "j")
        basic_mv3_code = .Cells(basic_i, "k")
        basic_mv3_att = .Cells(basic_i, "l")
        basic_mv3_val = .Cells(basic_i, "m")
        basic_title = .Cells(basic_i, "n")
        basic_description = .Cells(basic_i, "o")
        basic_ebay_cat1 = .Cells(basic_i, "p")
        basic_ebay_cat2 = .Cells(basic_i, "q")
        basic_item_spec4 = .Cells(basic_i, "r")
        basic_item_spec5 = .Cells(basic_i, "s")
        basic_item_spec6 = .Cells(basic_i, "t")
        basic_item_spec7 = .Cells(basic_i, "u")
        basic_item_spec8 = .Cells(basic_i, "v")
        basic_item_spec9 = .Cells(basic_i, "w")
        basic_item_spec10 = .Cells(basic_i, "x")
        basic_item_spec11 = .Cells(basic_i, "y")
        basic_item_spec12 = .Cells(basic_i, "z")
        basic_item_spec13 = .Cells(basic_i, "aa")
        basic_item_spec14 = .Cells(basic_i, "ab")
        basic_item_spec15 = .Cells(basic_i, "ac")
        basic_photo = .Cells(basic_i, "ad")
    
        
        ‘j来引导下一个多属性
        j = i
        
        
        ‘----------------------------
        ‘数据表列号
        dsheet_row_id = "A"
        dsheet_shop_initial = "B"
        dsheet_sitecode = "C"
        dsheet_currency = "D"
        dsheet_format = "E"
        dsheet_duration = "F"
        dsheet_var_parent_sku = "G"
        dsheet_product_code = "H"
        dsheet_remark = "I"
        dsheet_var_photo = "J"
        dsheet_var_child_var1 = "K"
        dsheet_var_child_var2 = "L"
        dsheet_var_child_var3 = "M"
        dsheet_var_child_var4 = "N"
        dsheet_var_child_var5 = "O"
        dsheet_var_ean = "P"
        dsheet_var_upc = "Q"
        dsheet_var_isbn = "R"
        dsheet_lot_size = "S"
        dsheet_qty = "T"
        dsheet_price = "U"
        dsheet_discount_profileid = "V"
        dsheet_isoffer = "W"
        dsheet_rejectamt = "X"
        dsheet_acceptamt = "Y"
        dsheet_payment_method = "Z"
        dsheet_paypal_email = "AA"
        dsheet_autopay = "AB"
        dsheet_checkout_policy = "AC"
        dsheet_itemcountry = "AD"
        dsheet_itemlocation = "AE"
        dsheet_ship_to_country = "AF"
        dsheet_exclude_shiptolocation = "AG"
        dsheet_ship_service = "AH"
        dsheet_first_post = "AI"
        dsheet_second_post = "AJ"
        dsheet_intl_ship_service = "AK"
        dsheet_intl_ship_location = "AL"
        dsheet_intl_first_post = "AM"
        dsheet_intl_second_post = "AN"
        dsheet_max_dispatch_time = "AO"
        dsheet_return_accepted = "AP"
        dsheet_return_refund = "AQ"
        dsheet_return_within = "AR"
        dsheet_return_shipby = "AS"
        dsheet_return_policy = "AT"
        dsheet_productsize = "AU"
        dsheet_receivedesc1 = "AV"
        dsheet_receivedesc2 = "AW"
        dsheet_receivedesc3 = "AX"
        dsheet_receivedesc4 = "AY"
        dsheet_receivedesc5 = "AZ"
        dsheet_maindesc01 = "BA"
        dsheet_maindesc02 = "BB"
        dsheet_maindesc03 = "BC"
        dsheet_maindesc04 = "BD"
        dsheet_maindesc05 = "BE"
        dsheet_maindesc06 = "BF"
        dsheet_maindesc07 = "BG"
        dsheet_maindesc08 = "BH"
        dsheet_maindesc09 = "BI"
        dsheet_maindesc10 = "BJ"
        dsheet_pictotal = "BK"
        dsheet_poster = "BL"
        dsheet_poster_link = "BM"
        dsheet_gallery = "BN"
        dsheet_gallerytype = "BO"
        dsheet_photofirst = "BP"
        dsheet_pic_use_actual_path = "BQ"
        dsheet_desc_use_actual_html = "BR"
        dsheet_cmptblty_use_profile = "BS"
        dsheet_pic_actual_paths = "BT"
        dsheet_condition_id = "BU"
        dsheet_condition_desc = "BV"
        dsheet_ebcategory = "BW"
        dsheet_ebcategory2 = "BX"
        dsheet_shopcategory1 = "BY"
        dsheet_shopcategory2 = "BZ"
        dsheet_sitecategory = "CA"
        dsheet_titleexternal = "CB"
        dsheet_subtitleexternal = "CC"
        dsheet_titleinternal = "CD"
        dsheet_item_specific_1 = "CE"
        dsheet_item_specific_2 = "CF"
        dsheet_item_specific_3 = "CG"
        dsheet_item_specific_4 = "CH"
        dsheet_item_specific_5 = "CI"
        dsheet_item_specific_6 = "CJ"
        dsheet_item_specific_7 = "CK"
        dsheet_item_specific_8 = "CL"
        dsheet_item_specific_9 = "CM"
        dsheet_item_specific_10 = "CN"
        dsheet_item_specific_11 = "CO"
        dsheet_item_specific_12 = "CP"
        dsheet_item_specific_13 = "CQ"
        dsheet_item_specific_14 = "CR"
        dsheet_item_specific_15 = "CS"
        dsheet_catalog_type = "CT"
        dsheet_catalog_id = "CU"
        dsheet_catalog_use_photo = "CV"
        dsheet_catalog_use_specific = "CW"
        dsheet_profile_idx = "CX"
        dsheet_cmptblty_profile_idx = "CY"
        dsheet_template_idx = "CZ"
        dsheet_attr_group = "DA"
        dsheet_privatelisting = "DB"
        dsheet_listenhancement = "DC"
        dsheet_keep_enabled = "DD"
        dsheet_EOF = "DE"

‘-----------------------------------------------
        ‘E_US站点参数
        
            Cells(i, dsheet_row_id) = ""
            Cells(i, dsheet_shop_initial) = "e"
            Cells(i, dsheet_sitecode) = "US"
            Cells(i, dsheet_currency) = "USD"
            Cells(i, dsheet_format) = "BIN"
            Cells(i, dsheet_duration) = "GTC"
            
            If basic_ismult = 1 Then

arr_mv1_cod = Split(basic_mv1_code, ",")
                    
                len_mv1_cod = UBound(arr_mv1_cod)
                    
                arr_mv1_val = Split(basic_mv1_val, ",")
                    
                len_mv1_val = UBound(arr_mv1_val)
            
                If Trim(basic_mv3_val = "") Then
                
                    ‘判断单SKU和单属性值
                    If Trim(basic_mv2_val = "") Then
                        
                        If len_mv1_cod = len_mv1_val Then
                        
                            
                            For mv1_i = 0 To len_mv1_cod
                            
                                Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"
                        
                                Cells(j, dsheet_product_code) = basic_sku & "-" & UCase(arr_mv1_cod(mv1_i)) & "/120129eusd"
                                
                                If arr_mv1_val(mv1_i) Like "x*" Then
                                
                                    Cells(j, dsheet_var_child_var1) = Application.Proper(basic_mv1_att) & ":" & UCase(arr_mv1_val(mv1_i))
                                
                                Else
                                
                                    Cells(j, dsheet_var_child_var1) = Application.Proper(basic_mv1_att & ":" & arr_mv1_val(mv1_i))
                                
                                End If
                                
                                Cells(j, dsheet_var_upc) = "Does not apply"
                            
                                Cells(j, dsheet_lot_size) = 1
                            
                                Cells(j, dsheet_qty) = 15
                            
                                Cells(j, dsheet_price) = basic_price
                                
                                Cells(j, dsheet_EOF) = "o"
                            
                                j = j + 1
                                
                            Next
                            
                        Else
                        
                         MsgBox (basic_i & "row:length of mv1_code and mv1_val not same")
                         
                         Exit Sub
                        
                        End If
                    
                    ‘判断单SKU双属性值,或者双SKU双属性值
                    Else
                    
                    arr_mv2_val = Split(basic_mv2_val, ",")
        
                    len_mv2_val = UBound(arr_mv2_val)
                    
                        ‘判断单SKU双属性值
                        
                        If Trim(basic_mv2_code) = "" Then
                        
                            If (len_mv1_cod + 1) = (len_mv1_val + 1) * (len_mv2_val + 1) Then
                            
                                
                                ‘使用mv_k定位循环双属性值
                                
                                mv_k = j
        
‘*****************************循环SKU编号
                            
                            For mv1code_i = 0 To len_mv1_cod
                            
                                Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"
                    
                                Cells(j, dsheet_product_code) = basic_sku & "-" & arr_mv1_cod(mv1code_i) & "/120129eusd"
                                
                                Cells(j, dsheet_var_upc) = "Does not apply"
                                    
                                Cells(j, dsheet_lot_size) = 1
                                    
                                Cells(j, dsheet_qty) = 15
                                    
                                Cells(j, dsheet_price) = basic_price
                                
                                Cells(j, dsheet_EOF) = "o"
                                    
                                j = j + 1
                            
                            Next
                                
                                
                                For len_mv1val_i = 0 To len_mv1_val
                                
                                    For len_mv2val_i = 0 To len_mv2_val
                                    
                                    
                                        ‘判断属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                        
                                        If arr_mv1_val(len_mv1val_i) Like "x*" Then
                                        
                                            Cells(mv_k, dsheet_var_child_var1) = Application.Proper(basic_mv1_att) & ":" & UCase(arr_mv1_val(len_mv1val_i))
                                            
                                        Else
                                        
                                            Cells(mv_k, dsheet_var_child_var1) = Application.Proper(basic_mv1_att & ":" & arr_mv1_val(len_mv1val_i))
                                        
                                        End If
                                        
                                        
                                        ‘判断属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                        
                                        If arr_mv2_val(len_mv2val_i) Like "x*" Then
                                        
                                            Cells(mv_k, dsheet_var_child_var2) = Application.Proper(basic_mv2_att) & ":" & UCase(arr_mv2_val(len_mv2val_i))
                                        
                                        Else
                                        
                                            Cells(mv_k, dsheet_var_child_var2) = Application.Proper(basic_mv2_att & ":" & arr_mv2_val(len_mv2val_i))
                                        
                                        End If
                                        
                                            
                                        mv_k = mv_k + 1
                                    
                                    Next
                                
                                Next
                                
                            Else
                        
                                MsgBox (basic_i & "row:len_mv1_cod!=len_mv1_val*len_mv2_val")
                                
                                Exit Sub
                        
                            End If
                        
                        ‘双SKU双属性值
                        Else
                        
                            arr_mv2_cod = Split(basic_mv2_code, ",")
                    
                            len_mv2_cod = UBound(arr_mv2_cod)
                            
                            If len_mv1_cod <> len_mv1_val Then
                            
                                MsgBox (basic_i & "row:2/2 mode len_mv1_cod!=len_mv1_val")
                                
                                Exit Sub
                                
                            End If
                            
                            If len_mv2_cod <> len_mv2_val Then
                            
                                MsgBox (basic_i & "row:2/2 mode len_mv2_cod!=len_mv2_val")
                                
                                Exit Sub
                                
                            End If
                            
                            ‘循环双SKU和双属性
                            
                            For mv1val_i = 0 To len_mv1_val
                                
                                For mv2val_i = 0 To len_mv2_val
                                
                                    Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"
                                        
                                    Cells(j, dsheet_product_code) = basic_sku & "-" & UCase(arr_mv1_cod(mv1val_i)) & UCase(arr_mv2_cod(mv2val_i)) & "/120129eusd"
                                        
                                    ‘判断MV1属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                        
                                    If arr_mv1_val(mv1val_i) Like "x*" Then
                                        
                                        Cells(j, dsheet_var_child_var1) = Application.Proper(basic_mv1_att) & ":" & UCase(arr_mv1_val(mv1val_i))
                                            
                                    Else
                                
                                        Cells(j, dsheet_var_child_var1) = Application.Proper(basic_mv1_att & ":" & arr_mv1_val(mv1val_i))
                                        
                                    End If
                                        
                                        
                                    ‘判断MV2属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                    
                                    If arr_mv2_val(mv2val_i) Like "x*" Then
                                        
                                        Cells(j, dsheet_var_child_var2) = Application.Proper(basic_mv2_att) & ":" & UCase(arr_mv2_val(mv2val_i))
                                        
                                    Else
                                        
                                        Cells(j, dsheet_var_child_var2) = Application.Proper(basic_mv2_att & ":" & arr_mv2_val(mv2val_i))
                                        
                                    End If
                                        
                                    Cells(j, dsheet_var_upc) = "Does not apply"
                                        
                                    Cells(j, dsheet_lot_size) = 1
                                        
                                    Cells(j, dsheet_qty) = 15
                                        
                                    Cells(j, dsheet_price) = basic_price
                                    
                                    Cells(j, dsheet_EOF) = "o"
                                        
                                    j = j + 1
                    
                                Next
                                
                            Next
                            
                        End If
                        
                    End If
‘**********************************************************
                Else

‘先获取mv3的值
                    
                    arr_mv3_val = Split(basic_mv3_val, ",")
        
                    len_mv3_val = UBound(arr_mv3_val)
                    
                    arr_mv2_val = Split(basic_mv2_val, ",")
        
                    len_mv2_val = UBound(arr_mv2_val)

‘判断双SKU,三属性值
                    
                    If basic_mv2_code <> "" And basic_mv3_code = "" Then

arr_mv2_cod = Split(basic_mv2_code, ",")
                    
                        len_mv2_cod = UBound(arr_mv2_cod)
                        
                        
                        If (len_mv1_cod + 1) * (len_mv2_cod + 1) = (len_mv1_val + 1) * (len_mv2_val + 1) * (len_mv3_val + 1) Then
                        
                            
                            mv_k3 = j
                        
                            For mv1code_i = 0 To len_mv1_cod
                            
                                For mv2code_i = 0 To len_mv2_cod
                            
                                    Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"
                        
                                    Cells(j, dsheet_product_code) = basic_sku & "-" & UCase(arr_mv1_cod(mv1code_i)) & UCase(arr_mv2_cod(mv2code_i)) & "/120129eusd"
                                    
                                    Cells(j, dsheet_var_upc) = "Does not apply"
                                        
                                    Cells(j, dsheet_lot_size) = 1
                                        
                                    Cells(j, dsheet_qty) = 15
                                        
                                    Cells(j, dsheet_price) = basic_price
                                    
                                    Cells(j, dsheet_EOF) = "o"
                                        
                                    j = j + 1
                                
                                Next
                            
                            Next
                            
                        
                            For mv1val_i = 0 To len_mv1_val
                                    
                                For mv2val_i = 0 To len_mv2_val
                                
                                    For mv3val_i = 0 To len_mv3_val
                                    
                                        
                                         ‘判断MV1属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                        
                                        If arr_mv1_val(mv1val_i) Like "x*" Then
                                            
                                            Cells(mv_k3, dsheet_var_child_var1) = Application.Proper(basic_mv1_att) & ":" & UCase(arr_mv1_val(mv1val_i))
                                                
                                        Else
                                    
                                            Cells(mv_k3, dsheet_var_child_var1) = Application.Proper(basic_mv1_att & ":" & arr_mv1_val(mv1val_i))
                                            
                                        End If
                                        
                                        ‘判断MV2属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                        
                                        If arr_mv2_val(mv2val_i) Like "x*" Then
                                        
                                            
                                            Cells(mv_k3, dsheet_var_child_var2) = Application.Proper(basic_mv2_att) & ":" & UCase(arr_mv2_val(mv2val_i))
                                            
                                        Else
                                            
                                            Cells(mv_k3, dsheet_var_child_var2) = Application.Proper(basic_mv2_att & ":" & arr_mv2_val(mv2val_i))
                                            
                                        End If
                                        
                                        
                                        ‘判断MV3属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                        
                                        If arr_mv3_val(mv3val_i) Like "x*" Then
                                        
                                            
                                            Cells(mv_k3, dsheet_var_child_var3) = Application.Proper(basic_mv3_att) & ":" & UCase(arr_mv3_val(mv3val_i))
                                            
                                            
                                        Else
                                            
                                            Cells(mv_k3, dsheet_var_child_var3) = Application.Proper(basic_mv3_att & ":" & arr_mv3_val(mv3val_i))
                                            
                                        End If
                                             
                                        mv_k3 = mv_k3 + 1
                                        
                                    Next
                                    
                                Next
                                
                            Next
                        Else
                        
                            MsgBox (basic_i & "row:2SKU/3colum len_cod!=len_val")
                                
                            Exit Sub
                        
                        End If

‘判断单SKU,三属性值
                    
                    ElseIf basic_mv2_code = "" And basic_mv3_code = "" Then
                    
                        If (len_mv1_cod + 1) = (len_mv1_val + 1) * (len_mv2_val + 1) * (len_mv3_val + 1) Then
                        
                        
                            mv_k3 = j
                        
                            For mv1code_i = 0 To len_mv1_cod
                            
                                Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"
                    
                                Cells(j, dsheet_product_code) = basic_sku & "-" & UCase(arr_mv1_cod(mv1code_i)) & "/120129eusd"
                                
                                Cells(j, dsheet_var_upc) = "Does not apply"
                                    
                                Cells(j, dsheet_lot_size) = 1
                                    
                                Cells(j, dsheet_qty) = 15
                                    
                                Cells(j, dsheet_price) = basic_price
                                
                                Cells(j, dsheet_EOF) = "o"
                                    
                                j = j + 1
                            
                            Next
                
                            For mv1val_i = 0 To len_mv1_val
                                        
                                    For mv2val_i = 0 To len_mv2_val
                                    
                                        For mv3val_i = 0 To len_mv3_val
                                        
                                            
                                             ‘判断MV1属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                            
                                            If arr_mv1_val(mv1val_i) Like "x*" Then
                                                
                                                Cells(mv_k3, dsheet_var_child_var1) = Application.Proper(basic_mv1_att) & ":" & UCase(arr_mv1_val(mv1val_i))
                                                    
                                            Else
                                        
                                                Cells(mv_k3, dsheet_var_child_var1) = Application.Proper(basic_mv1_att & ":" & arr_mv1_val(mv1val_i))
                                                
                                            End If
                                            
                                            ‘判断MV2属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                            
                                            If arr_mv2_val(mv2val_i) Like "x*" Then
                                            
                                                
                                                Cells(mv_k3, dsheet_var_child_var2) = Application.Proper(basic_mv2_att) & ":" & UCase(arr_mv2_val(mv2val_i))
                                                
                                            Else
                                                
                                                Cells(mv_k3, dsheet_var_child_var2) = Application.Proper(basic_mv2_att & ":" & arr_mv2_val(mv2val_i))
                                                
                                            End If
                                            
                                            
                                            ‘判断MV3属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                            If arr_mv3_val(mv3val_i) Like "x*" Then
                                            
                                                
                                                Cells(mv_k3, dsheet_var_child_var3) = Application.Proper(basic_mv3_att) & ":" & UCase(arr_mv3_val(mv3val_i))
                                                
                                                
                                            Else
                                                
                                                Cells(mv_k3, dsheet_var_child_var3) = Application.Proper(basic_mv3_att & ":" & arr_mv3_val(mv3val_i))
                                                
                                            End If
                                                
                                            mv_k3 = mv_k3 + 1
                                            
                                        Next
                                        
                                    Next
                                    
                                Next
                                
                            Else
                            
                                MsgBox (basic_i & "row:1SKU/3colum len_cod!=len_val")
                                
                                Exit Sub
                            
                            End If
                    
                    
                    ‘判断三SKU,三属性值
                    
                    ElseIf basic_mv2_code <> "" And basic_mv3_code <> "" Then
                    
                        arr_mv2_cod = Split(basic_mv2_code, ",")
                    
                        len_mv2_cod = UBound(arr_mv2_cod)
                        
                        arr_mv3_cod = Split(basic_mv3_code, ",")
                    
                        len_mv3_cod = UBound(arr_mv3_cod)
                        
                        
                        If len_mv1_cod <> len_mv1_val Then
                            
                                MsgBox (basic_i & "row:3/3 mode len_mv1_cod!=len_mv1_val")
                                
                                Exit Sub
                                
                            End If
                            
                        If len_mv2_cod <> len_mv2_val Then
                            
                            MsgBox (basic_i & "row:3/3 mode len_mv2_cod!=len_mv2_val")
                                
                            Exit Sub
                                
                        End If
                        
                        If len_mv3_cod <> len_mv3_val Then
                            
                            MsgBox (basic_i & "row:3/3 mode len_mv3_cod!=len_mv3_val")
                                
                            Exit Sub
                                
                        End If
                        
                        
                        ‘循环三属性
                        
                        For mv1val_i = 0 To len_mv1_val
                                    
                                For mv2val_i = 0 To len_mv2_val
                                
                                    For mv3val_i = 0 To len_mv3_val
                                    
                                        Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"
                                            
                                        Cells(j, dsheet_product_code) = basic_sku & "-" & UCase(arr_mv1_cod(mv1val_i)) & UCase(arr_mv2_cod(mv2val_i)) & UCase(arr_mv3_cod(mv3val_i)) & "/120129eusd"
                                        
                                         ‘判断MV1属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                        
                                        If arr_mv1_val(mv1val_i) Like "x*" Then
                                            
                                            Cells(j, dsheet_var_child_var1) = Application.Proper(basic_mv1_att) & ":" & UCase(arr_mv1_val(mv1val_i))
                                                
                                        Else
                                    
                                            Cells(j, dsheet_var_child_var1) = Application.Proper(basic_mv1_att & ":" & arr_mv1_val(mv1val_i))
                                            
                                        End If
                                        
                                        ‘判断MV2属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                        
                                        If arr_mv2_val(mv2val_i) Like "x*" Then
                                        
                                            
                                            Cells(j, dsheet_var_child_var2) = Application.Proper(basic_mv2_att) & ":" & UCase(arr_mv2_val(mv2val_i))
                                            
                                        Else
                                            
                                            Cells(j, dsheet_var_child_var2) = Application.Proper(basic_mv2_att & ":" & arr_mv2_val(mv2val_i))
                                            
                                        End If
                                        
                                        
                                        ‘判断MV3属性值有没有XL,用Application.Proper只能首字母大写,无法让全部字母大写
                                        If arr_mv3_val(mv3val_i) Like "x*" Then
                                        
                                            
                                            Cells(j, dsheet_var_child_var3) = Application.Proper(basic_mv3_att) & ":" & UCase(arr_mv3_val(mv3val_i))
                                            
                                            
                                        Else
                                            
                                            Cells(j, dsheet_var_child_var3) = Application.Proper(basic_mv3_att & ":" & arr_mv3_val(mv3val_i))
                                            
                                        End If
                                            
                                        Cells(j, dsheet_var_upc) = "Does not apply"
                                            
                                        Cells(j, dsheet_lot_size) = 1
                                            
                                        Cells(j, dsheet_qty) = 15
                                            
                                        Cells(j, dsheet_price) = basic_price
                                        
                                        Cells(j, dsheet_EOF) = "o"
                                            
                                        j = j + 1
                                        
                                    Next
                                    
                                Next
                                
                            Next

Else
                    
                        MsgBox ("Extra Useless Colum")

End If

End If
‘**************************
            ElseIf basic_ismult = 0 Then
            
                Cells(j, dsheet_lot_size) = 1
                    
                Cells(j, dsheet_qty) = 15
                    
                Cells(j, dsheet_price) = basic_price
                
                Cells(j, dsheet_var_parent_sku) = basic_sku & "/120129eusd-P"
                
                Cells(j, dsheet_product_code) = basic_sku & "/120129eusd-P"
                
                j = j + 1
                
            Else
            
                MsgBox ("ismult error/#N/A")
                Rows(i).Delete
                Exit Sub
                    
            End If
                
                
‘            Cells(i, dsheet_remark) = ""
‘            Cells(i, dsheet_var_photo) = ""
‘            Cells(i, dsheet_var_child_var3) = ""
‘            Cells(i, dsheet_var_child_var4) = ""
‘            Cells(i, dsheet_var_child_var5) = ""
‘            Cells(i, dsheet_discount_profileid) = ""
            Cells(i, dsheet_isoffer) = 0
            Cells(i, dsheet_rejectamt) = 0
            Cells(i, dsheet_acceptamt) = 0
            Cells(i, dsheet_payment_method) = "PayPal"
            
            If Cells(i, dsheet_price) > 4.99 Then
            
            
                Cells(i, dsheet_paypal_email) = "[email protected]"
                
                Cells(i, dsheet_ship_service) = "ePacketChina"
                
            ElseIf Cells(i, dsheet_price) < 5 And Cells(i, dsheet_price) > 0 Then
            
                
                Cells(i, dsheet_ship_service) = "EconomyShippingFromOutsideUS"
                
                Cells(i, dsheet_paypal_email) = "[email protected]"
                
                
            End If
                
            Cells(i, dsheet_autopay) = 0
‘            Cells(i, dsheet_checkout_policy) = ""
            Cells(i, dsheet_itemcountry) = "CN"
            Cells(i, dsheet_itemlocation) = "Shenzhen"
            Cells(i, dsheet_ship_to_country) = "Worldwide"
‘            Cells(i, dsheet_exclude_shiptolocation) = ""
            Cells(i, dsheet_first_post) = 0
            Cells(i, dsheet_second_post) = 0
            Cells(i, dsheet_intl_ship_service) = "StandardInternational"
            Cells(i, dsheet_intl_ship_location) = "Worldwide"
            Cells(i, dsheet_intl_first_post) = 0
            Cells(i, dsheet_intl_second_post) = 0
            Cells(i, dsheet_max_dispatch_time) = 2
            Cells(i, dsheet_return_accepted) = "ReturnsAccepted"
            Cells(i, dsheet_return_refund) = "MoneyBackOrExchange"
            Cells(i, dsheet_return_within) = "Days_14"
            Cells(i, dsheet_return_shipby) = "Buyer"
            Cells(i, dsheet_return_policy) = "Restocking fees: No"
‘            Cells(i, dsheet_productsize) = ""
‘            Cells(i, dsheet_receivedesc1) = ""
‘            Cells(i, dsheet_receivedesc2) = ""
‘            Cells(i, dsheet_receivedesc3) = ""
‘            Cells(i, dsheet_receivedesc4) = ""
‘            Cells(i, dsheet_receivedesc5) = ""
            Cells(i, dsheet_maindesc01) = basic_description     ‘产品内容文字描述
‘            Cells(i, dsheet_maindesc02) = ""
‘            Cells(i, dsheet_maindesc03) = ""
‘            Cells(i, dsheet_maindesc04) = ""
‘            Cells(i, dsheet_maindesc05) = ""
‘            Cells(i, dsheet_maindesc06) = ""
‘            Cells(i, dsheet_maindesc07) = ""
‘            Cells(i, dsheet_maindesc08) = ""
‘            Cells(i, dsheet_maindesc09) = ""
‘            Cells(i, dsheet_maindesc10) = ""
            Cells(i, dsheet_pictotal) = 0
‘            Cells(i, dsheet_poster) = ""
‘            Cells(i, dsheet_poster_link) = ""
            Cells(i, dsheet_gallery) = basic_photo
            Cells(i, dsheet_gallerytype) = "Gallery"
‘            Cells(i, dsheet_photofirst) = ""
            Cells(i, dsheet_pic_use_actual_path) = 1
            Cells(i, dsheet_desc_use_actual_html) = 0
            Cells(i, dsheet_cmptblty_use_profile) = 0
‘            Cells(i, dsheet_pic_actual_paths) = ""
            Cells(i, dsheet_condition_id) = 1000
‘            Cells(i, dsheet_condition_desc) = ""
            Cells(i, dsheet_ebcategory) = basic_ebay_cat1
            Cells(i, dsheet_ebcategory2) = basic_ebay_cat2
‘            Cells(i, dsheet_shopcategory1) = basic_shop_cat1
‘            Cells(i, dsheet_shopcategory2) = basic_shop_cat2
‘            Cells(i, dsheet_sitecategory) = ""
            Cells(i, dsheet_titleexternal) = Trim(Replace(basic_title, Chr(10), ""))
‘            Cells(i, dsheet_subtitleexternal) = ""
            Cells(i, dsheet_titleinternal) = Trim(Replace(basic_title, Chr(10), ""))
            
            Cells(i, dsheet_item_specific_1) = "Brand:Unbranded"
            Cells(i, dsheet_item_specific_2) = "MPN:Does not apply"
            If basic_ismult <> 1 Then Cells(i, dsheet_item_specific_3) = "UPC:Does not apply"
            Cells(i, dsheet_item_specific_4) = Trim(basic_item_spec4)
            Cells(i, dsheet_item_specific_5) = Trim(basic_item_spec5)
            Cells(i, dsheet_item_specific_6) = Trim(basic_item_spec6)
            Cells(i, dsheet_item_specific_7) = Trim(basic_item_spec7)
            Cells(i, dsheet_item_specific_8) = Trim(basic_item_spec8)
            Cells(i, dsheet_item_specific_9) = Trim(basic_item_spec9)
            Cells(i, dsheet_item_specific_10) = Trim(basic_item_spec10)
            Cells(i, dsheet_item_specific_11) = Trim(basic_item_spec11)
            Cells(i, dsheet_item_specific_12) = Trim(basic_item_spec12)
            Cells(i, dsheet_item_specific_13) = Trim(basic_item_spec13)
            Cells(i, dsheet_item_specific_14) = Trim(basic_item_spec14)
            Cells(i, dsheet_item_specific_15) = Trim(basic_item_spec15)
‘            Cells(i, dsheet_catalog_type) = ""
‘            Cells(i, dsheet_catalog_id) = ""
            Cells(i, dsheet_catalog_use_photo) = 0
            Cells(i, dsheet_catalog_use_specific) = 0
‘            Cells(i, dsheet_profile_idx) = ""
‘            Cells(i, dsheet_cmptblty_profile_idx) = ""
            Cells(i, dsheet_template_idx) = 2362
‘            Cells(i, dsheet_attr_group) = ""
            Cells(i, dsheet_privatelisting) = 1
‘            Cells(i, dsheet_listenhancement) = ""
            Cells(i, dsheet_keep_enabled) = 0
            Cells(i, dsheet_EOF) = 0
            i = j
        
        basic_i = basic_i + 1
    Loop
        
    End With

End Sub

时间: 2024-08-21 12:09:24

ebay商品基本属性组合成数据表格式,可用上传到系统递交数据的相关文章

浅析http请求头常见的表单文件上传

首先先了解下application/x-www-form-urlencoded和multipart/form-data的区别 application/x-www-form-urlencoded: 是常用的表单发包方式,普通的表单提交,或者js发包,默认都是通过这种方式, <form enctype="application/x-www-form-urlencoded" action="http://" method="POST"> &

Ajax(form表单文件上传、请求头之contentType、Ajax传递json数据)

form表单文件上传 上菜 file_put.html <form action="" method="post" enctype="multipart/form-data"> {# 这里必须要请求头格式才能把上传文件的对象传过去 enctype="multipart/form-data"#} 姓名 <input type="text" name="user">

表单文件上传与文件下载

一.简介 使用form表单进行需要为form添加enctype="multipart/form-data" 属性,除此之外还需要将表单的提交方法改成post,如下 method="post". 二.示例 1.表单文件上传 网页代码如下: 1 <!DOCTYPE html> 2 <html> 3 <head> 4 </head> 5 <body> 6 <form action="${pageC

NSURLSession(Get &amp; Post,JSON、XML数据解析,文件上传下载)

NSURLSession(Get & Post,JSON.XML数据解析,文件上传下载) 一.NSURLSession概述 NSURLSession是iOS7中新的网络接口,支持后台网络操作,除非用户强行关闭. NSURLSession使用步骤: 1. 新建NSURLSessionConfiguration,用于NSURLSession的配置 2. 新建NSURLSession 3. 新建NSURLSessionTask对象 4. 执行task 其中NSURLSessionConfigurati

socket上传nsdictionary的json数据异常

异常情况如下:按照正常的写法,将上传对数据封装在nsdictionary里,然后检验是否符合json格式化,调用系统的json序列化方法将nsdictionary转化为json数据然后上传, 异常结果如下:,后台只能收到收到nsdictionary的第一个{,后测试数据从nsdictionary的第一个{断开了 由于控制台打印的nsdictioanry数据如下 故猜测上传数据时"\n"作为了数据的分隔符被切断了,所以将nsdictionary转化为nsstring并且将"\n

使用HTML的表单form上传文件,需要考虑的几个问题

应用系统中经常需要有文件上传功能,一般的做法都是使用HTML的<form>和<input type="file">,或者使用第三方文件上传组件,如swfupload和uploadify.我们都知道如果向服务器提交数据,一般来说都是使用POST请求,请求数据会放在请求体中,以key1=value1&key2=value2的形式.这样的报文,服务器是很容易解析的.如果是上传文件,通过httpwatch抓包工具,我们可以发现:文件的内容也是放在post请求体中

CURL模拟表单post提交及相关常用参数的使用(包括提交表单同时上传文件)

转载自:https://blog.csdn.net/freedomwjx/article/details/43278157 一. 首先,最简单的情况是我们只需要提交一个不带文件上传的表单,这种情况下,只需要在curl中使用--data(注意是--不是-)或者它的缩写-d即可. [plain] view plain copy curl -d "key=value&key=value" "url" 或者 [plain] view plain copy curl 

iOS开发——网络Swift篇&amp;NSURLSession加载数据、下载、上传文件

NSURLSession加载数据.下载.上传文件 NSURLSession类支持三种类型的任务:加载数据.下载和上传.下面通过样例分别进行介绍. 1,使用Data Task加载数据 使用全局的sharedSession()和dataTaskWithRequest方法创建. 1 func sessionLoadData(){ 2 //创建NSURL对象 3 let urlString:String="http://hangge.com" 4 var url:NSURL! = NSURL(

C# WPF ASP.net 上传多文件和数据

C# WinForm 上传多文件和数据 public static class HttpHelper { private static readonly Encoding DEFAULTENCODE = Encoding.UTF8; /// <summary> /// HttpUploadFile /// </summary> /// <param name="url"></param> /// <param name="