Android Question Using Designer mode to select a date and then read from an excel spreadsheet

Colin Evans

Active Member
Licensed User
Longtime User
Hi, just having a look at B4A which at first glance looks amazing but being a complete novice I'm following examples and tutorials to try and learn as I go along.

My first project would be to create a phone app for myself that has a calendar on screen that when a date is clicked information from an excel spreadsheet pops up relevant to the date selected.

I have played with the excellent excel example and got it load my spreadsheet but bviously it loads the full spreadsheet onto the screen, whereas I want only the relevant bits linked to the date.

I assume this is possible but unfortunately I can't find and examples or guidance anywhere that will help a pure novice like myself,

Attached is a sample of my spreadsheet in the hope that someone will have a few minutes to create a sample that I can understand

Basically the screen would consist of a calendar

then fields labelled with the corresponding value next to them

Date: Day
1st Lock High Water
Last Lock Height
Lock Close

In the hope that someone can help
Many thanks
COlin

Don't seem to be able to upload the xls file so below is the format

Date Day 1st Lock HW Height Last Lock Lock Close
01/05/2016 Sun 04:35:00 06:30:00 7.70 08:00:00 08:20:00
02/05/2016 Mon 05:45:00 07:45:00 7.90 09:20:00 09:40:00
03/05/2016 Tue 06:45:00 08:55:00 8.50 10:40:00 11:00:00
04/05/2016 Wed 07:35:00 09:55:00 9.10 11:50:00 12:10:00
05/05/2016 Thur 08:20:00 10:50:00 9.60 12:50:00 13:10:00
06/05/2016 Fri 09:05:00 11:40:00 10.00 13:45:00 14:05:00
07/05/2016 Sat 09:55:00 12:25:00 10.10 14:35:00 14:55:00

Not being a true programmer I used VB6 which seems similar to B4A but i always use the design of the screen first and then add the relevant code to the various buttons, datepicker, lists, combo boxes etc.

I've now purchased B4A and hopefully will be able to get to grips, but having said that I welcome example programs where I seem to learn quicker

Hope you can help
 

Attachments

  • locktimes.zip
    5.2 KB · Views: 239
  • locktimes.zip
    5.2 KB · Views: 229

Colin Evans

Active Member
Licensed User
Longtime User
Hi Sorry about the duplicate, but when you said to post again I assume that was what you meant

Is there anyway to change to the date format to dd/mm/yyyy rather than mm/dd/yyyy
 
Upvote 0

Colin Evans

Active Member
Licensed User
Longtime User
Hi Erel

Made some progress and attached my amendments to the datepicker, which is loading the relevant data from the excel spreadsheet, only thing I can't seem to sort out is the date shown when selected by the date picker, first time is in the format MM/DD/YYYY but reformatting it in the code works but then on the next selections the format goes to DD/MM/YYY but the month is always 00

I uploaded the code along with excel file etc in the hope you'll spot it immedaitely
 

Attachments

  • exceldatepicker.zip
    19.5 KB · Views: 268
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Use the date event...
 

Attachments

  • adp.zip
    19.5 KB · Views: 249
Upvote 0

Colin Evans

Active Member
Licensed User
Longtime User
One more question please, in the spreadsheet the times are stored in 24hr format i.e. in row one the first lock is 04:35 and the first lock in the afternoon is 17:20 but they display in the program as 04:35:00 and 05:20:00 is there a way of retaining the 24hr format or putting AM PM at the end, and also remove the seconds

Thanks
 
Upvote 0
Top