
Announcements
Hello Everyone,
I have create an app by using Microsoft Power Apps. The detail of the apps is checking student who come to school in time, late, not coming. in output I want to have an excel file(file name is ...date). the file will be overwrite if check again in day. when tomorrow the file will have a next day name)
My Problem is how to collect the data [in time, late, not coming] with and export to excel in One drive. Anyone have any idea of this? or if anyone have any idea you can leaving a comment too.
[I have attached an image]
Thank you very much.
@thanapong
Don't overwrite the values in your spreadsheet. Instead, keep a log for all dates.
Start by creating a table in Excel with all Student names
| FirstName | LastName |
| Joe | Smith |
| Jane | Verdun |
| Jackie | Long |
Then create a collection in your app by putting this code in the OnSelect property of the button used to start a new survey
ClearCollect(
colAttendance,
AddColumns(
excel_studentnames_table,
"AttendanceDate", Today(),
"Status":, ""
)
)
Use the collection in the Items property of the gallery
colAttendance
Put some code like this in the OnSelect property of the status icon buttons
Patch(colAttendance, ThisItem, {Status: "In-Time"})Patch(colAttendance, ThisItem, {Status: "Late"})Patch(colAttendance, ThisItem, {Status: "Not Coming"})
Now go back to Excel and create another table to record attendance for each day.
| AttendanceDate | FirstName | LastName | Status |
Finally, go back into your app and make a new button. Use this code to add the daily attendance data to Excel
Collect(excel_attendancelog_table, colAttendance);
---
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."