cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Data not transferring to excel

Everything is transfering exept for the date.  The excel cell is simply blank.

 

If make the DataField into "Activation_Date" instead of Activation_Date, then I get the error in the red bar.

 

How can I fix this?

 

error.png

1 ACCEPTED SOLUTION

Accepted Solutions
hpkeong
Community Champion
Community Champion

Hi @Anonymous

 

I suppose you are not using Submit(Form), otherwise it will not have such problems as Submit (Form) is built-in function.

But if you are using Patch(), so as @AndyPennell mentioned, use Text to convert into a string.

 

Text(DatePicker.SelectedDate, "dd mmm, yyyy") will do.

 

This tutorial helps.

https://powerapps.microsoft.com/en-us/tutorials/function-text/

 

Hope this helps.

TQ

hpkeong

View solution in original post

7 REPLIES 7
AndyPennell
Power Apps
Power Apps

The error says it is expecting a string, so I would use the Text function to convert the date into a string before pushing to Excel.

Anonymous
Not applicable

Where would the Text function be inserted?  Into the Update field?

hpkeong
Community Champion
Community Champion

Hi @Anonymous

 

I suppose you are not using Submit(Form), otherwise it will not have such problems as Submit (Form) is built-in function.

But if you are using Patch(), so as @AndyPennell mentioned, use Text to convert into a string.

 

Text(DatePicker.SelectedDate, "dd mmm, yyyy") will do.

 

This tutorial helps.

https://powerapps.microsoft.com/en-us/tutorials/function-text/

 

Hope this helps.

TQ

hpkeong

View solution in original post

Anonymous
Not applicable

I was using the Sumbit(form).  Oddly, the form had two tiles titled the same so I just turned on the second one for the date and it works.

valuehr
Helper I
Helper I

I have tried this posted solution, but my data is still not writing to Excel.  The posted solution is not clear exactly which property this solution is supposed to be added.

 

Is the Text(DatePicker.SelectedDate, "dd mmm, yyyy" solution supposed to be added to the DatePicker, to the Gallery, to the OnSelect property or something else?  If it's to be to the DatePicker, there is no "Text" property to the DatePicker.

 

I am using the Patch function on a custom gallery to get my data to write to Excel.

 

Please help!  I have tried so many things and nothing is helping.  I get the same error message as this user.

 

 

 

 

Anonymous
Not applicable

Here's what I did.

 

1.) Make sure there's only 1 field active. (My for some reason has two "Activation" showing)  

2.) Activate the field card and delete the input field in it

3.) With the card selected, click Insert > Controls > Date Picker

4.) Change the "Update" field of the card to DatePicker#.SelectedDate

 

 

This works for me and is now putting in the Date into my Excel file. 

I tried your suggestion. It is still not writing to Excel.  The example of the pic posted is not from me.  It's from another user, but I am having the same problem.

 

Update:  This actually worked!  I put the coding in the wrong area.  I tried it this morning, and it worked.  Happy days!

 

Thank you.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (91,994)