cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Cells with space are taking as different lines in excel from power apps

Hi I have a gallery that needs to be download as CSV but i have a problem in that it is having one text field with multi line option so when I try to download it is going to next cells and entire  excel sheet is collapsing, how can I fix this ?

this is my excel sheet downloaded 

GAbraham_1-1602948292589.png

 

this is my text field with multi line option and if I enter text with spaces or enter like 2 lines it is going to different cells

GAbraham_2-1602948427506.png

 

this is my code :

Clear(unpaidarcol);
Set(
    unpaidarvar,
    ""
);
ForAll(
    Ageing_gallery.AllItems,
    Collect(
        unpaidarcol,
        {
            paraccnm: AcntName.Text,
            div: 'Dividion Name'.Text,
            terms: Terms.Text,
            cur: cur.Text,
            curr: Currency.Text,
            thirtydays: '0-30'.Text,
            sixtydays: '31-60'.Text,
            nintydays: '61-90'.Text,
            onetwentydays: '90-120'.Text,
            morethnonetwenty: '>120'.Text,
            tot: total.Text,
            lastpayrecdt: LastPaymentReceviedDate.Text,
            catg: Category.Text,
            ep: EP.Text,
            lastupddt: LastUpdatDate.Text,
            colnm: Collectornm.Text,
            cmnts: Trim(Comments.Text),
            nxtflwup: NextFollowUp.Text
        }
    )
);
UpdateContext(
    {
        currtotal: currtotal_lbl.Text,
        thirty: 0 - '0-30_total_lbl'.Text,
        sixty: '31-60_total_lbl'.Text,
        ninety: '61-90_total_lbl'.Text,
        hundredtwenty: 'Greater 90_total_lbl'.Text,
        over120: over120_total_lbl.Text,
        total: OverTotal.Text
    }
);
Set(
    unpaidarvar,
    "Parent Account, Division, Terms, Cur, Current, 1-30, 31-60, 61-90, 91-120, Over 120, Total, Last Payment Date, Category, EP, Last Updated Date, Collector Name, Comments, Next Follow-up Date" & Char(10) & Concat(
        unpaidarcol,
        paraccnm & "," & """" & div & """" & "," & """" & terms & """" & "," & cur & "," & """" &  curr & """" & "," & """" & thirtydays & """" & "," & """" & sixtydays & """" & "," & """" & nintydays & """" & "," & """" & onetwentydays & """" & "," & """" & morethnonetwenty & """" & "," & """" & tot & """" & "," & """" & lastpayrecdt & """" & "," & """" & catg & """" & "," & """" & ep & """" & "," & """" & lastupddt & """" & "," & """" & colnm & """" & ","  & """" & cmnts & """" & "," & """" & nxtflwup & """" & Char(10)
    ) & Char(10) & "Total" & "," & " " & "," & " " & "," & " " & "," & """" & currtotal & """" & "," & """" & thirty & """" & "," & """" & sixty & """" & "," & """" & ninety & """" & "," & """" & hundredtwenty & """" & "," & """" & over120 & """" & "," & """" & total & """" & ","
);

 

 
 Thank you in advance
Giftson Abraham
3 REPLIES 3
Highlighted
Memorable Member
Memorable Member

Re: Cells with space are taking as different lines in excel from power apps

Hi @GAbraham ,

Hope you are using ,Microsoft Flow for Export/File Create Purpose ,My Suggestion is You Can Formate your Column as  CSV Table.

For reference see the below Way..(i also faced the same issue in the past but after this approach, my outcomes is expected).
you can Add a Create CSV Table action and Formate Manulally like below - and Map the Correct column,

VijayTailor_0-1603004486767.png

You can see for my requirement, i am using Remarks (That is also multiline Text).
Thanks,

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay

Highlighted
Frequent Visitor

Re: Cells with space are taking as different lines in excel from power apps

How to pass collection as array to flow
Thank you!

Highlighted
Memorable Member
Memorable Member

Re: Cells with space are taking as different lines in excel from power apps

Hi @GAbraham ,

For this approach first, you need to send the Data to flow in JSON format. Like below  - 

//Collection Name - ExportCSV
Set(varFOrmattedJson,JSON(ExportCSV,JSONFormat.IndentFour));
Set(IsCompleted,ExportFileFromSP.Run(varFOrmattedJson,Text("ExportCSVFile_"&First(Split(varCurrentUser.Email, "@")).Result),"NA").completed);

 Now you can Parse the JSON Data in Flow.
After you can you Configure like below-highlighted Approach.

VijayTailor_0-1603097255714.png

Thanks,
Vijay

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,730)