我对PowerBI有点陌生,真的很难解决字符的截断问题。快速统计行数显示,一个刮擦文本的最大字符限制是1,024。
下面是我的函数:
let GetData=(URL) =>
let
Source = Web.BrowserContents(URL),
#"Extracted Table From Html" = Html.Table(Source, {{"Column1", ".fld"}, {"Column2", ".fld + *"}, {"Column3", "DIV:nth-child(8) .title"}, {"Column4", "BR + BR + A"}, {"Column5", "TR:nth-child(3) A"}, {"Column6", ".less *"}, {"Column7", ".more P:nth-child(1)"}, {"Column8", "TR:nth-child(7) BR + *"}, {"Column9", "TR:nth-child(3) P"}, {"Column10", "TR:nth-child(4) P"}, {"Column11", "TR:nth-child(5) P"}, {"Column12", "TR:nth-child(6) P"}, {"Column13", ".seemore"}, {"Column14", ".horipane STRONG"}, {"Column15", "TR:nth-child(4) .refanch"}, {"Column16", "TR:nth-child(5) .refanch"}, {"Column17", "TR:nth-child(6) .refanch"}}, [RowSelector=".fld"]),
#"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}, {"Column5", type text}, {"Column6", type text}, {"Column7", type text}, {"Column8", type text}, {"Column9", type text}, {"Column10", type text}, {"Column11", type text}, {"Column12", type text}, {"Column13", type text}, {"Column14", type text}, {"Column15", type text}, {"Column16", type text}, {"Column17", type text}}),
#"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"Column1", "Column2"})
in
#"Removed Other Columns"
in GetData
我尝试使用此链接中的解决方案,但我无法应用该解决方案,因为我需要更多关于如何实现它的说明。我希望这样做可以取消1,024个字符的限制。如果有人能帮助我解决以下问题,我将不胜感激:
1.使用此函数的输出会为每个URL创建40多行。我特别尝试解决第一行的截断问题。不确定这是否在上面的函数代码中表示为“Column1”?
1.看起来函数中所有的列值都是文本类型的。如果我可以使用这里建议的解决方案,我应该如何以及在哪里编写代码字符串来将值替换为文本?
1条答案
按热度按时间tcomlyy61#
原来截断只适用于Power编辑器的预览!一旦你保存并关闭编辑器,回到PowerBI主窗口,你就可以创建你的表格,然后,截断的单元格会完整地出现!你可以将最终的表格保存为.csv文件,那里也没有截断。非常感谢罗恩Rosenfeld的确认,我想我差不多在同一时间到达了同一个地方!