Forum Discussion
import ics file
The code presented above by Anonymous was a useful starter for me - thanks!
I did find it is limited to the first 15 events in the calendar.
FWIW here's my effort - it splits first onto rows which will handle an unlimited number of events.
When it splits out the columns (step: Split Column by Delimiter), I limited it to the first 14 columns, which seemed to cover all the useful data. Depending on your scenario you might need more (or less).
let
Source =Table.FromValue({Text.FromBinary( Parameter2 )}),
#"Split Column by Delimiter2" = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Value", Splitter.SplitTextByDelimiter("BEGIN:VEVENT", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Value"),
#"Removed Top Rows" = Table.Skip(#"Split Column by Delimiter2",1),
#"Split Column by Delimiter" = Table.SplitColumn(#"Removed Top Rows", "Value", Splitter.SplitTextByDelimiter("#(cr)#(lf)", QuoteStyle.Csv), {"Value.1", "Value.2", "Value.3", "Value.4", "Value.5", "Value.6", "Value.7", "Value.8", "Value.9", "Value.10", "Value.11", "Value.12", "Value.13", "Value.14"}),
#"Renamed Columns" = Table.RenameColumns(#"Split Column by Delimiter",{{"Value.7", "Start Date Time"}, {"Value.9", "Location"}, {"Value.13", "Subject"}, {"Value.5", "End Date Time"}}),
#"Removed Other Columns" = Table.SelectColumns(#"Renamed Columns",{"End Date Time", "Start Date Time", "Location", "Subject"})
in
#"Removed Other Columns"