Excel file and Javascript

Discussion in 'ASP General' started by Robert Scheer, Jul 29, 2003.

  1. Hi.

    One of the pages of my application opens an Excel 2000 workbook in a
    new window using Javascript. The workbook is read only and I use a
    window.open command to open the workbook. On the workbook's
    BeforeClose event I have a code to avoid the 'Save' dialog: Me.Saved =
    True

    If I open the page locally, change some content and close the
    workbook, the 'Save' dialog does not appear, as expected. As soon as I
    open the workbook on the web, the 'Save' dialog still appears when I
    close the window. I need to allow my users to change the contents of
    the workbook but they cannot save the workbook. Is my approach wrong?
    How can I avoid the 'Save' dialog?

    Thanks,

    Robert Scheer
    Robert Scheer, Jul 29, 2003
    #1
    1. Advertising

  2. Robert Scheer

    Ray at Guest

    The me.saved (or thisworkbook.saved) property would have to be set for the
    workbook itself and you'd put that in the Workbook_BeforeClose event, i.e.

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    ThisWorkbook.Saved = True
    End Sub

    But this is assuming that your client enables macros when launches your
    workbook.

    Ray at home

    --
    Will trade ASP help for SQL Server help


    "Robert Scheer" <> wrote in message
    news:...
    > Hi.
    >
    > One of the pages of my application opens an Excel 2000 workbook in a
    > new window using Javascript. The workbook is read only and I use a
    > window.open command to open the workbook. On the workbook's
    > BeforeClose event I have a code to avoid the 'Save' dialog: Me.Saved =
    > True
    >
    > If I open the page locally, change some content and close the
    > workbook, the 'Save' dialog does not appear, as expected. As soon as I
    > open the workbook on the web, the 'Save' dialog still appears when I
    > close the window. I need to allow my users to change the contents of
    > the workbook but they cannot save the workbook. Is my approach wrong?
    > How can I avoid the 'Save' dialog?
    >
    > Thanks,
    >
    > Robert Scheer
    Ray at, Jul 30, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luis Esteban Valencia
    Replies:
    1
    Views:
    1,366
    Carl Prothman [MVP]
    Jan 12, 2005
  2. Anonieko
    Replies:
    2
    Views:
    7,291
    JackStraw73
    Feb 12, 2008
  3. =?Utf-8?B?SGVtYW50IFNpcGFoaW1hbGFuaQ==?=

    Export to Excel (Default File Type - Excel)

    =?Utf-8?B?SGVtYW50IFNpcGFoaW1hbGFuaQ==?=, Apr 24, 2006, in forum: ASP .Net
    Replies:
    15
    Views:
    17,461
    syed hassan
    May 21, 2009
  4. Replies:
    1
    Views:
    1,775
    extentechjohn
    Nov 21, 2006
  5. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,481
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
Loading...

Share This Page