Page 1 of 3 123 LastLast
Results 1 to 10 of 27
  1. #1
    Join Date
    Dec 2007
    Posts
    25

    Newbie dives in for advice

    Hi all, my first post.

    I posted on Nick Hodges blog that I was having problems finding answers to problems (I am new to Delphi and have purchased Turbo Delphi Pro win32). Some kind soul suggested that I could ask any Delphi question here and be likely to get the best help available on the internet.

    So here goes.

    I would like to access an XL spreadsheet file. Each line holds a name, a date and a number of other text fields. I would like to load each name in turn and check its Soundex value (I know how to do the Soundex bit) against a target soundex string. If there is a match, I would then like to load in the rest of the line information into a record array for later display and printing.

    I have read Zarco Gajics tutorial on how to load and edit an XL spreadsheet into a DBGrid http://delphi.about.com/od/database/l/aa090903a.htm and am wondering if it is possible to bolt onto the back of this somehow, once the spreadsheet is loaded into the DBGrid, are the field values accessable for further processing and if so, either how do I do this, or where can I find information that can explain to me how? If it cannot be done, what route should I be exploring.

    Thanks
    DerekSmith

  2. #2
    Join Date
    Jun 2007
    Posts
    47
    Using excel doesnt sound the best way for this, i would create a record of all the fields and save to a .DAT file, then records could be loading into a stringgrid and access/edited easily.

  3. #3
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    Working with excel will add a number of difficulties to your problem, so, if you can avoid it, I would suggest you do.

    As $eymour says a dat file of some form may work, although any form of readable file would arguably do. You may then find it easier to write the main part of your app and if you are still needing to do the excel part, then, start incorporating excel.
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

  4. #4
    Join Date
    Jan 2007
    Posts
    640
    Ummm... the article DerekSmith mentions walks through how to incorporate excell into a DBGrid already. I think (and please correct me if I'm wrong), he's asking if once the data is in a DBGrid, can he then do further processing. If thats the quesiton the answer is yes you can. You need to reference that data. Column/Record. Saving back to excel might be another matter.

    VK

  5. #5
    Join Date
    Dec 2007
    Posts
    25
    Sadly the XL is not optional. My local genealogy society has all its Parish transcriptions in numerous XL sheets and will continue their transcription work into a medium that all the volunteers are familiar with i.e. the XL.

    I could transcribe all the XL sheets into a dat but then I would have to keep updating the dat every time new transcriptions are entered into the sheets.

    It might programatically be harder to use the XL but the users require it this way so any help will be greatly appreciated.

    Derek

  6. #6
    Join Date
    Dec 2007
    Posts
    25
    Hi VK,

    The app is going to be read only, so if you can point me as to how to read that info so I can access it within the program (other than just look at it in the DBGrid) I will be onto a winner.

  7. #7
    Join Date
    Dec 2007
    Posts
    25
    $eymour,

    You might be on to something, you say read the XL into a record.

    Great, how do I do that please.

    Derek

  8. #8
    Join Date
    Jun 2007
    Posts
    47
    I wouldnt touch the excel option, as you are the one making the programme you could make it far more user friendly for the parish volunteers plus you would be able to validate all inputs which would decrease the risk of error, you would have to spend some time adding all the old reconds on to the file but the volunteers would add the new records using the app you made. Hope this is useful.

  9. #9
    Join Date
    Dec 2007
    Posts
    25
    Thanks $eymour,

    I know you are right at the programmers level but this is not optional, the users have the final say and my task is to find a way to meet their wishes.

    So, following your suggestion of reading the xl into a record, do you know how to do this?

    Derek

  10. #10
    Join Date
    Jun 2007
    Posts
    47
    Im abit lost then.. if you not the one to enter any data and they end users already use excel what is the need for a delphi front end?

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •