Can anyone find what is wrong with the following?

D

Derek Richards

The following syntax is what I found under the Help in Excel's VBA
Editor (you may refer to it for the details of each parameter). i
specified to open in Write
mode (Read Only is false), it doesn't do the way as I wished to open
in
Write mode. Instead, still saw (Read Only) above the MenuBar on the
upper
left corner when an excel file is opened.


Syntax

expression.Open(FileName, UpdateLinks, ReadOnly, Format, Password,
WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter,
Editable, Notify, Converter, AddToMRU)


Here I care nothing else but opening a file in Read & Write. How to
specify the parameters to open in Read & Write in javascript given the
syntax?

Thanks very much.
 
V

VK

What does it have to do with tea and China(with JavaScript and Web)?

If you are looking for a JScript "hook" to VBA, you can do something
like this:

function openExcel() {
var Excel = new ActiveXObject("Excel.Application");
Excel.Visible = true;
Excel.Application.Workbooks.Open("C:\\MyBook.xls");
//...
}
It opens MyBook in the normal (read/write) mode like if you run it in
the conventional way. Of cource it works with security warnings, only on
Internet Explorer, and only on your own computer (or within a LAN, see
second optional parameter of ActiveXObject).

If you want to serve a book to Explorer over the Web, just use a regular
link <a href="http://..../MyBook.xls"> Of course you cannot save changes
back to server, but you can edit and save on your computer.
 
D

Derek Richards

Hi Tim, thanks.

Here it is.

e.Workbooks.Open(strFileName, null, false, null, null, null, true);

However, the file is still opened in Read-Only. How strange it is! Any suggestions?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top