let
func=
(filepath)=>
let
a=Web.Contents(filepath),
Источник = Table.FromColumns({Lines.FromBinary(a, null, null, 65001)}),
Duplicat = Table.DuplicateColumn(Источник, "Column1", "Column2"),
Custom = Table.TransformColumns(Duplicat, {"Column1", each if
Text.Contains(_, "class=""att"">") then
Text.BetweenDelimiters(_, "class=""att"">", "</p>") else if
Text.Contains(_, "p class=""pn"">") then
Text.BetweenDelimiters(_, "p class=""pn"">", ":") else null}),
custom = Table.TransformColumns(Custom, {"Column2", each if
Text.Contains(_, "p class=""mt0"">") then
Text.BetweenDelimiters(_, "p class=""mt0"">", "</p>") else if
Text.Contains(_, "</li>") then
Text.BetweenDelimiters(_, "<li>", "</li>") else if
Text.Contains(_, "class=""mdn"">") then
Text.BetweenDelimiters(_, "class=""mdn"">", "</h1>") else if
Text.Contains(_, "p class=""pn"">Part Number:") then
Text.BetweenDelimiters(_, "p class=""pn"">Part Number:", "</p>") else null}),
Filled = Table.FillDown(custom,{"Column1"}),
Filtered = Table.SelectRows(Filled, each [Column2] <> null and [Column2] <> ""),
Transposed = Table.Transpose(Filtered),
Headers = Table.PromoteHeaders(Transposed, [PromoteAllScalars=true])
in
Headers,
a=Excel.CurrentWorkbook(),
Таблица2 = a{[Name="Таблица2"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Таблица2,{{"Столбец1", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "a", each func([Столбец1])),
#"Removed Errors" = Table.RemoveRowsWithErrors(#"Added Custom", {"a"}),
#"Expanded {0}" = Table.ExpandTableColumn(#"Removed Errors", "a", {"Column1", "Part Number", "Processor Manufacturer", "Processor Type", "Processor Generation", "Processor Model", "Processor Speed", "Maximum Turbo Speed", "Processor Core", "Cache", "Direct Media Interface", "64-bit Processing", "Hyper-Threading", "vPro Technology", "Standard Memory", "Memory Technology", "Memory Card Reader", "Memory Card Supported", "Memory Card Supported_1", "Total Solid State Drive Capacity", "Solid State Drive Interface", "Optical Drive Type", "Screen Size", "Display Screen Type", "Display Screen Technology", "Aspect Ratio", "Screen Mode", "Screen Resolution", "Backlight Technology", "Touchscreen", "Multi-touch Screen", "Graphics Controller Manufacturer", "Graphics Controller Model", "Graphics Memory Technology", "Graphics Memory Accessibility", "TV Card", "Wireless LAN", "Wireless LAN Standard", "Bluetooth", "Front Camera/Webcam", "Front Camera/Webcam Video Resolution", "Microphone", "Number of Microphones", "Finger Print Reader", "Speakers", "Number of Speakers", "Sound Mode", "HDMI", "Total Number of USB Ports", "Number of USB 2.0 Ports", "Number of USB 3.0 Ports", "USB Type-C", "Audio Line Out", "Operating System Platform", "Operating System", "Keyboard", "Keyboard Backlight", "Pointing Device Type", "Pointing Device Type_2", "TouchPad Features", "Number of Cells", "Battery Chemistry", "Battery Capacity", "Maximum Power Supply Wattage", "Colour", "Form Factor", "Height (Front)", "Height (Rear)", "Height", "Width", "Depth", "Weight (Approximate)", "Package Contents", "Package Contents_3", "Package Contents_4", "Package Contents_5", "Maximum Memory", "Solid State Drive Configuration", "Digitizer", "Wireless LAN Manufacturer", "Wireless LAN Model", "Bluetooth Standard", "Sensor Type", "Number of USB 3.1 Gen 1 Ports", "Operating System Architecture", "Keyboard Localization", "Battery Energy", "Maximum Battery Run Time", "Burst Frequency", "HDCP Supported", "USB Type-C Detail", "Headphone/Microphone Combo Port", "Package Contents_1", "Package Contents_2", "Security Features", "Security Features_3", "Security Features_4", "Security Features_5", "Number of Total Memory Slots", "Total Hard Drive Capacity", "Hard Drive Interface", "Hard Drive RPM", "Hard Drive Configuration", "Ethernet Technology", "Network (RJ-45)", "Certifications & Standards", "Security Features_6", "Number of Touch Points", "Graphics Memory Capacity", "Rear Camera", "Rear Camera Resolution", "Focus Modes", "Sensor Type_2", "Sensor Type_3", "Sensor Type_4", "Number of USB 3.1 Gen 2 Ports", "Keyboard Type", "Pointing Device Type_5", "Maximum Video Battery Time", "Height with Dock", "Width with Dock", "Depth with Dock", "Weight without Dock (Approximate)", "Weight with Dock (Approximate)", "Package Contents_6", "Package Contents_7", "Package Contents_8", "Package Contents_9", "Package Contents_10", "Security Features_11", "Security Features_12", "Security Features_13", "Display Screen Technology_1", "Near Field Communication", "Microphone Type", "VGA", "Security Features_7", "Security Features_8", "Security Features_9", "Number of USB 3.1 Gen 1 Type-A Ports", "Number of USB 3.1 Gen 1 Type-C Ports", "Maximum Web Surfing Battery Time", "Features", "USB Type-C Detail_2", "Cellular Network Supported", "Cellular Data Connectivity Technology", "Cellular Data Connectivity Technology_2", "Cellular Data Connectivity Technology_3", "Cellular Data Connectivity Technology_4", "GPS", "WWAN Supported", "Docking Connector Type", "Front Camera/Webcam Resolution", "Numeric Pad"}, {"Column1", "Part Number", "Processor Manufacturer", "Processor Type", "Processor Generation", "Processor Model", "Processor Speed", "Maximum Turbo Speed", "Processor Core", "Cache", "Direct Media Interface", "64-bit Processing", "Hyper-Threading", "vPro Technology", "Standard Memory", "Memory Technology", "Memory Card Reader", "Memory Card Supported", "Memory Card Supported_1", "Total Solid State Drive Capacity", "Solid State Drive Interface", "Optical Drive Type", "Screen Size", "Display Screen Type", "Display Screen Technology", "Aspect Ratio", "Screen Mode", "Screen Resolution", "Backlight Technology", "Touchscreen", "Multi-touch Screen", "Graphics Controller Manufacturer", "Graphics Controller Model", "Graphics Memory Technology", "Graphics Memory Accessibility", "TV Card", "Wireless LAN", "Wireless LAN Standard", "Bluetooth", "Front Camera/Webcam", "Front Camera/Webcam Video Resolution", "Microphone", "Number of Microphones", "Finger Print Reader", "Speakers", "Number of Speakers", "Sound Mode", "HDMI", "Total Number of USB Ports", "Number of USB 2.0 Ports", "Number of USB 3.0 Ports", "USB Type-C", "Audio Line Out", "Operating System Platform", "Operating System", "Keyboard", "Keyboard Backlight", "Pointing Device Type", "Pointing Device Type_2", "TouchPad Features", "Number of Cells", "Battery Chemistry", "Battery Capacity", "Maximum Power Supply Wattage", "Colour", "Form Factor", "Height (Front)", "Height (Rear)", "Height", "Width", "Depth", "Weight (Approximate)", "Package Contents", "Package Contents_3", "Package Contents_4", "Package Contents_5", "Maximum Memory", "Solid State Drive Configuration", "Digitizer", "Wireless LAN Manufacturer", "Wireless LAN Model", "Bluetooth Standard", "Sensor Type", "Number of USB 3.1 Gen 1 Ports", "Operating System Architecture", "Keyboard Localization", "Battery Energy", "Maximum Battery Run Time", "Burst Frequency", "HDCP Supported", "USB Type-C Detail", "Headphone/Microphone Combo Port", "Package Contents_1", "Package Contents_2", "Security Features", "Security Features_3", "Security Features_4", "Security Features_5", "Number of Total Memory Slots", "Total Hard Drive Capacity", "Hard Drive Interface", "Hard Drive RPM", "Hard Drive Configuration", "Ethernet Technology", "Network (RJ-45)", "Certifications & Standards", "Security Features_6", "Number of Touch Points", "Graphics Memory Capacity", "Rear Camera", "Rear Camera Resolution", "Focus Modes", "Sensor Type_2", "Sensor Type_3", "Sensor Type_4", "Number of USB 3.1 Gen 2 Ports", "Keyboard Type", "Pointing Device Type_5", "Maximum Video Battery Time", "Height with Dock", "Width with Dock", "Depth with Dock", "Weight without Dock (Approximate)", "Weight with Dock (Approximate)", "Package Contents_6", "Package Contents_7", "Package Contents_8", "Package Contents_9", "Package Contents_10", "Security Features_11", "Security Features_12", "Security Features_13", "Display Screen Technology_1", "Near Field Communication", "Microphone Type", "VGA", "Security Features_7", "Security Features_8", "Security Features_9", "Number of USB 3.1 Gen 1 Type-A Ports", "Number of USB 3.1 Gen 1 Type-C Ports", "Maximum Web Surfing Battery Time", "Features", "USB Type-C Detail_2", "Cellular Network Supported", "Cellular Data Connectivity Technology", "Cellular Data Connectivity Technology_2", "Cellular Data Connectivity Technology_3", "Cellular Data Connectivity Technology_4", "GPS", "WWAN Supported", "Docking Connector Type", "Front Camera/Webcam Resolution", "Numeric Pad"})
in
#"Expanded {0}"
|