Forum Discussion

Francisco_G_Cal's avatar
4 years ago
Solved

Change text encoding in XML imported from Sharepoint Folder

Hi

 

I have a Sharepoint Folder with XML files encodes in 'iso-8859-1'

<?xml version="1.0" encoding="iso-8859-1"?>

 

If I where importing a SINGLE xml file, I have no problem, because, after import, I can change the 'Source' step:

From

= Xml.Tables(File.Contents("myFilePath"))

To

= Xml.Tables(File.Contents("myFilePath"),[], TextEncoding.Windows)

 

But I'm importing from Sharepoint Folder, and I cant see this step (the command Xml.Tables) in 'Source'

 

Could you help me, please?

 

Thanks!

 

 

 

  • I finally found it!

     

    When importing data from Sharepoint Folder, a FUNCTION is created automatically. There, the XML.File command is created

     

    = (Parameter1 as binary) => let
    Source = Xml.Tables(Parameter1),
    Table0 = Source{0}[Table]
    in
    Table0

     

    So, I can change it there

     

    = (Parameter1 as binary) => let
    Source = Xml.Tables(Parameter1,[], TextEncoding.Windows),
    Table0 = Source{0}[Table]
    in
    Table0

     

    That's it!

1 Reply

  • I finally found it!

     

    When importing data from Sharepoint Folder, a FUNCTION is created automatically. There, the XML.File command is created

     

    = (Parameter1 as binary) => let
    Source = Xml.Tables(Parameter1),
    Table0 = Source{0}[Table]
    in
    Table0

     

    So, I can change it there

     

    = (Parameter1 as binary) => let
    Source = Xml.Tables(Parameter1,[], TextEncoding.Windows),
    Table0 = Source{0}[Table]
    in
    Table0

     

    That's it!