web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Export sorted data fro...
Power Apps
Unanswered

Export sorted data from a gallery in powerapps to an existing excel table

(0) ShareShare
ReportReport
Posted on by 2

Good afternoon guys. I am trying to generate a flow in which I get the data from a gallery (which joins two databases) to an existing excel table. I was able to generate a collection from the table, start using the JSON format. But I'm not very familiar with power automate.

in the onselect function of a button I have:

Clear(listaprueba);;ForAll(Gallery8_1.AllItems;Collect(listaprueba;
{ Punto:ThisRecord.Value;
largo:ThisRecord.mcubicos.Largo;
alto:ThisRecord.mcubicos.Alto;
ancho:ThisRecord.mcubicos.Ancho;
diametro:ThisRecord.maislacion.DIAMETRO;
M3DINFIF:If(ThisRecord.mcubicos.Dificultad=false;Value(ThisRecord.mcubicos.M3;"en-US");0);
M3CONFIF:If(ThisRecord.mcubicos.Dificultad=true;Value(ThisRecord.mcubicos.M3;"en-US");0)
}));;exportaraexcel.Run(JSON(listaprueba))

and the flow I'm trying to do:

Sebastian4_1-1683060465876.png


and when using the output for some column like for example "plant", it fills the column with all the data.
I don't know how to fill the existing table, or if I'm taking the wrong path

Sebastian4_2-1683060684811.png

I really appreciate your time. Many of your contributions helped me get started in powerapps.
Greetings!

 

Categories:
I have the same question (0)
  • Sebastian4 Profile Picture
    2 on at

    Para quienes esten pasando por lo mismo, exporte la coleccion obtenida de la galeria de powerapps, con formato JSON.
     en un boton puse la siguiente funcion:

    Clear(listaprueba) ;; ForAll(Gallery8_1.AllItems;Collect(listaprueba;
    { Punto:ThisRecord.Value;
    largo:ThisRecord.mcubicos.Largo + 0;
    alto:ThisRecord.mcubicos.Alto + 0;
    ancho:ThisRecord.mcubicos.Ancho +0;
    diametro:ThisRecord.maislacion.DIAMETRO + 0;
    M3DINFIF:If(ThisRecord.mcubicos.Dificultad=false;Value(ThisRecord.mcubicos.M3;"en-US");0);
    M3CONFIF:If(ThisRecord.mcubicos.Dificultad=true;Value(ThisRecord.mcubicos.M3;"en-US");0);
    accm05a2:ThisRecord.maislacion.'ACC-M-0.5A2' + 0;
    accm2a4:ThisRecord.maislacion.'ACC-M-2A4' + 0;
    accm4a8:ThisRecord.maislacion.'ACC-M-4A8'+ 0;
    accm8a10:ThisRecord.maislacion.'ACC-M-8A10'+ 0;
    accm12plus:ThisRecord.maislacion.'ACC-M-12A+'+ 0;
    ml05a2:ThisRecord.maislacion.'ML-M-0.5A2'+ 0;
    ml2a4:ThisRecord.maislacion.'ML-M-2A4'+ 0;
    ml5a8:ThisRecord.maislacion.'ML-M-5A8'+ 0;
    ml10a16:ThisRecord.maislacion.'ML-M-10A16'+ 0;
    ml16a20:ThisRecord.maislacion.'ML-M-16A20'+ 0;
    mlmas22:ThisRecord.maislacion.'ML-M-22A+'+ 0;

    accP05a2:ThisRecord.maislacion.'ACC-P-0.5A2'+ 0;
    accP2a4:ThisRecord.maislacion.'ACC-P-2A4'+ 0;
    accP4a8:ThisRecord.maislacion.'ACC-P-4A8'+ 0;
    accP8a10:ThisRecord.maislacion.'ACC-P-8A10'+ 0;
    accP12plus:ThisRecord.maislacion.'ACC-P-12A+'+ 0;
    mPl05a2:ThisRecord.maislacion.'ML-P-0.5A2'+ 0;
    mlP2a4:ThisRecord.maislacion.'ML-P-2A4'+ 0;
    mlP5a8:ThisRecord.maislacion.'ML-P-5A8'+ 0;
    mlP10a16:ThisRecord.maislacion.'ML-P-10A16'+ 0;
    mlP16a20:ThisRecord.maislacion.'ML-P-16A20'+ 0;
    mlPmas22:ThisRecord.maislacion.'ML-P-22A+'+ 0;
    titulo:ThisRecord.nombre;
    planta:ThisRecord.planta
    }))
    ;; exportaraexcel.Run(JSON(listaprueba)) .

    En power automate use powerapps v2, tome los datos JSON,  los analice con PARSE JSON.
    Mi coleccion tenia muchos valores "null" que eran los que generaban el error. Se ve que en clear collect sumo +0, es para que tome el valor como 0 si esta vacio.

    otro detalle es que el esquema generado automaticamente por power automate debe ser modificado. Mis valores tienen comas,(2,57) y generalmente los toma como numeros enteros. para eso hay que poner "number":

    "mlmas22": {
                    "type""number"
                }

    Por ultimo use añadir filas en excel, y seleccione cada objeto en la columna que corresponde, de las salidas del analisis de archivo JSON.
     
    Sebastian4_0-1683561021985.png

     

    esto automaticamente aplica a cada objeto json, y se carga completamente.

    Respondo a mi consulta, porque quizas es muy complicado para uno que recien empieza como yo, y tiene la complejidad del idioma tambien.

    Sin mas, saludos!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard