Yes, I understand the order doesn’t matter.
My suggestion is simply that pasting the following into Manager should be sufficient when entering a multiple line or multiple invoice transaction:
You are suggesting that no, it’s not sufficient, the customer must apply the following PowerQuery themselves:
// Function: Unpivot all columns except the specified ones then perform row to column transformation for Manager.io batch operation
let
Source = (tbl as table, columnsToKeep as list) as table =>
let
Unpivoted = Table.UnpivotOtherColumns(
tbl,
columnsToKeep,
"Attribute", // Name of column for original column names
"Value" // Name of column for values
),
#"Split Column by Delimiter" = Table.SplitColumn(Unpivoted, "Attribute", Splitter.SplitTextByDelimiter(".", QuoteStyle.Csv), {"Attribute.1", "Attribute.2", "Attribute.3"}),
#"Removed Columns" = Table.RemoveColumns(#"Split Column by Delimiter",{"Attribute.2"}),
#"Filtered Rows" = Table.SelectRows(#"Removed Columns", each ([Attribute.1] = "Lines")),
//get group key
groupkey = List.RemoveItems(Table.ColumnNames(#"Filtered Rows"), {"Value"}),
//get the other columns
ungroupedColumns = List.Difference(Table.ColumnNames(#"Filtered Rows"), groupkey),
//group dynamically
#"Grouped Rows" = Table.Group(
#"Filtered Rows",
groupkey,
{
{"All", each _, type table}
}
),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([All],"Index",1)),
#"Removed Other Columns" = Table.SelectColumns(#"Added Custom", {"Custom"}),
#"Expand Columns" = Table.Combine(#"Removed Other Columns"[Custom]),
#"Sorted Rows" = Table.Sort(#"Expand Columns",{{"Index", Order.Ascending}}),
#"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Sorted Rows", {
{"Index", type text}}, "en-US"),
{"Attribute.1", "Index", "Attribute.3"}
,Combiner.CombineTextByDelimiter(".", QuoteStyle.None), "Merged"),
// remove all placeholders
allColumnNames = Table.ColumnNames(#"Merged Columns"),
replaceFn = each if _ = "PLACEHOLDER" then null else _,
transformAll = List.Transform(allColumnNames, each {_, replaceFn}),
#"remove placeholders" = Table.TransformColumns(#"Merged Columns", transformAll),
#"Pivoted Column" = Table.Pivot(#"remove placeholders", List.Distinct(#"Merged Columns"[Merged]), "Merged", "Value")
in
#"Pivoted Column"
in
Source
to get:

before copy pasting into Manager
I simply do not see the value. Nor do I see the value in needing to extract the headers every time like it’s a chore.
Batch Operations is supposed to save time, making it complicated negates that.