SHARE
TWEET

Untitled

a guest Aug 26th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let
  2.     Source = Excel.Workbook(File.Contents("C:\Users\Gebruiker\Downloads\voorbeeld-configurable-import.xlsx"), null, true),
  3.     #"voorbeeld-configurable-import_Sheet" = Source{[Item="voorbeeld-configurable-import",Kind="Sheet"]}[Data],
  4.     #"Promoted Headers" = Table.PromoteHeaders(#"voorbeeld-configurable-import_Sheet", [PromoteAllScalars=true]),
  5.     #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"sku", Int64.Type}, {"attribute_set_code", type text}, {"pa_aankoppeling", type text}, {"product_type", type text}, {"product_online", Int64.Type}, {"tax_class_name", type text}, {"visibility", type text}, {"price", Int64.Type}, {"base_image", type text}, {"base_image_label", type any}, {"small_image", type text}, {"small_image_label", type any}, {"thumbnail_image", type text}, {"thumbnail_image_label", type any}, {"additional_images", type text}, {"additional_attributes", type text}, {"configurable_variations", type text}, {"qty", Int64.Type}, {"product_websites", type text}, {"name", type text}}),
  6.     #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"configurable_variations"}),
  7.     #"Added Custom" = Table.AddColumn(#"Removed Columns", "Custom", each "sku=" & Text.From([sku]) & "," & Text.From([additional_attributes])),
  8.     #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Custom"}),
  9.     #"Transposed Table" = Table.Transpose(#"Removed Other Columns"),
  10.     #"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Transposed Table", {{"Column66", type text}}, "en-US"),{"Column1", "Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9", "Column10", "Column11", "Column12", "Column13", "Column14", "Column15", "Column16", "Column17", "Column18", "Column19", "Column20", "Column21", "Column22", "Column23", "Column24", "Column25", "Column26", "Column27", "Column28", "Column29", "Column30", "Column31", "Column32", "Column33", "Column34", "Column35", "Column36", "Column37", "Column38", "Column39", "Column40", "Column41", "Column42", "Column43", "Column44", "Column45", "Column46", "Column47", "Column48", "Column49", "Column50", "Column51", "Column52", "Column53", "Column54", "Column55", "Column56", "Column57", "Column58", "Column59", "Column60", "Column61", "Column62", "Column63", "Column64", "Column65", "Column66"},Combiner.CombineTextByDelimiter("|", QuoteStyle.None),"Merged")
  11. in
  12.     #"Merged Columns"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top