473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Excel file and Javascript

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
Jul 19 '05 #1
2 10036
Don't think you can. If it's in Excel the user can do with it as they
please. The thing is though that you can control if they can save it to the
server or not, but not locally.

--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------

"Robert Scheer" <rb******@my-deja.com> wrote in message
news:cf**************************@posting.google.c om...
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

Jul 19 '05 #2
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" <rb******@my-deja.com> wrote in message
news:cf**************************@posting.google.c om...
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

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: cv | last post by:
Hi all, I have to copy two set of data from 2 files(notepad/excel) say, products and their corresponding prices to list/textarea/table. I should be able to retrieve the product and corresponding...
3
by: Peter Noneley | last post by:
Thank you for reading. I am not a programmer, I can just about cobble things together using code examples, so please be gentle! - I will have an application open, such as Excel or Word. - I...
1
by: v_verno | last post by:
Good day, I have a web page that shows info retrieved from a MySQL db and I would like to convert all these data into an .XLS file. Have searched the net high and low but seems that I'm unable to...
7
by: Martin | last post by:
I have a situation where I'm displaying some information in a table on a web page. I've given the user the ability to make several different "queries" and show different sub-sets of the data. I...
1
by: bryanilton | last post by:
Hi guys, I hope that one of you gurus can help me out here. Basically what I'd like to do is be able to price harddrives. I'd like to have two drop-down boxes. One for the manufacturer and the...
1
by: BaaZauq | last post by:
Hello everybody! I'm not a master of clientside JavaScript but I have much working knowledge of it. Here is my problem : I have a web-page with a "text-area" box. I have an excel file with 10...
3
by: toffee | last post by:
Hi all, I got a pre-formatted spreadsheet. would it be possible using js to copy the data from a table on the current webpage, open the spreadsheet and paste the content ? if so, anyone got any...
2
by: lxrocks | last post by:
Hi I have always downloaded table data to excel using a perl_cgi. The perl cgi will simpley print("Content-Type: application/vnd.ms-excel"); followed by the usual html table formatted data. ...
2
budigila
by: budigila | last post by:
Hiya peeps, Okies, I have been trying to work this out for a while now to no avail... I am a beginner to this whole coding thing but have made great strides in my project. Basically what I am...
4
by: JaxDawg | last post by:
I have a spreadsheet saved as an XML spreadsheet so I can manipulate it easier (and don't need COM). When I'm done, I want to display to the user. Currently, I'm using simple JavaScript in my PHP...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.