Project design

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave Griffiths

    #1

    Project design

    Hi all

    I have coded some JavaScript as well as XHTML and now have a project that
    will help me learn to code better. An end to the means shall we say.

    The project will display data (Duty rosta for Doctors) in the browser, the
    page is dynamically created with JavaScript, at this point in time I
    assign values to the variables in the JavaScript and they appear in the
    correct places in the browser, and all the required data processes work,
    no black magic there.

    I have created an Excel sheet that the user data is inputted through,
    completely automated and works well, now!! can I get JavaScript read the
    data from the server side excel sheet into these variables, if so how, or
    do I need to start looking into another language here, I program in Visual
    Basic 5 and a little C++ but thought this is a XHTML/JavaScript related
    problem.

    A few plain english pointers would be apprectiated on how others would
    attack the problem.

    Thanks
    DaveG
  • Yann-Erwan Perio

    #2
    Re: Project design

    Dave Griffiths wrote:
    [color=blue]
    > I have created an Excel sheet that the user data is inputted through,
    > completely automated and works well, now!! can I get JavaScript read the
    > data from the server side excel sheet into these variables, if so how, or
    > do I need to start looking into another language here, I program in Visual
    > Basic 5 and a little C++ but thought this is a XHTML/JavaScript related
    > problem.[/color]

    You've gone for a strange architecture, why use an Excel spreadsheet as
    a database?

    Anyway, client-side javascript wouldn't be able to read the server-side
    Excel file, at least not in a normal environment (IE in a secure
    environment would probably be able to do it).

    You need therefore server-side scripting, either (1) to read the Excel
    file and send the whole HTML file with preset values, or (2) to interact
    more or less in the background with the Excel file.

    If you have ASP (Active Server Pages), then use it, it'll be easy to
    automate Excel from the server, either using VBScript or JScript, with
    the CreateObject method of the Server object.


    Regards,
    Yep.

    Comment

    • Dave Griffiths

      #3
      Re: Project design

      On Wed, 19 Nov 2003 23:31:23 +0100, Yann-Erwan Perio wrote:
      [color=blue]
      > Dave Griffiths wrote:
      >[color=green]
      >> I have created an Excel sheet that the user data is inputted through,
      >> completely automated and works well, now!! can I get JavaScript read
      >> the data from the server side excel sheet into these variables, if so
      >> how, or do I need to start looking into another language here, I
      >> program in Visual Basic 5 and a little C++ but thought this is a
      >> XHTML/JavaScript related problem.[/color]
      >
      > You've gone for a strange architecture, why use an Excel spreadsheet as
      > a database?
      >
      > Anyway, client-side javascript wouldn't be able to read the server-side
      > Excel file, at least not in a normal environment (IE in a secure
      > environment would probably be able to do it).
      >
      > You need therefore server-side scripting, either (1) to read the Excel
      > file and send the whole HTML file with preset values, or (2) to interact
      > more or less in the background with the Excel file.
      >
      > If you have ASP (Active Server Pages), then use it, it'll be easy to
      > automate Excel from the server, either using VBScript or JScript, with
      > the CreateObject method of the Server object.
      >
      >
      > Regards,
      > Yep.[/color]

      Thanks

      Tell me which way you would have gone about this, I'm really open to
      suggestions and would like to know the "correct" method of implementing
      such a task, I really do not have any great idea's here and the excel
      sheet was the easiest option to get somethings visable for the users
      originally, now we want to publish it on our intranet and if the excel
      sheet needs to go then so be it.

      I have never used ASP but that is now my next port of call, thanks again.

      DaveG

      Comment

      • Yann-Erwan Perio

        #4
        Re: Project design

        Dave Griffiths wrote:

        Hi Dave, sorry for the late answer.
        [color=blue]
        > Tell me which way you would have gone about this, I'm really open to
        > suggestions and would like to know the "correct" method of implementing
        > such a task, I really do not have any great idea's here and the excel
        > sheet was the easiest option to get somethings visable for the users
        > originally, now we want to publish it on our intranet and if the excel
        > sheet needs to go then so be it.[/color]

        Ah, I originally thought data were contained in the spreadsheet, not
        that they were inputted by the user, I didn't think it enough :-) Well,
        that's another matter, and since you couldn't apparently use web-based
        solutions from the beginning (with forms), the only other alternatives I
        see would have been to use forms, in Access - which makes it mandatory
        for the user to have Access installed and understood - not always possible.

        I can now imagine you need to use Excel as the data source, the solution
        you want to set up doesn't look bad, and you should be okay using ASP to
        access the data. Now, I can only suggest you take a strong defensive
        approach while parsing the Excel data, since users can easily change the
        Excel format, adding/deleting colums, masking/renaming stuff, changing
        cells type etc.

        For this sort of scriting, VBScript/ASP might be better than
        JScript/ASP, though I believe you could also encapsulate some
        validation/retrieval code into macros (I've never automated Excel macros
        in the past).


        Good luck,
        Yep.

        Comment

        Working...