Connecting Tech Pros Worldwide Forums | Help | Site Map

Can anyone find what is wrong with the following?

Derek Richards
Guest
 
Posts: n/a
#1: Jul 20 '05
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.

Tom Ogilvy
Guest
 
Posts: n/a
#2: Jul 20 '05

re: Can anyone find what is wrong with the following?


In vba, you would leave arguments blank in a comma separated list

Workbooks.Open(myFile,,false,,,,true)

I don't know what the rules are for Javascript.

--
Regards,
Tom Ogilvy



"Derek Richards" <Derek2122001@yahoo.com> wrote in message
news:2d38b9ae.0310240939.489f36ee@posting.google.c om...[color=blue]
> 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.[/color]


VK
Guest
 
Posts: n/a
#3: Jul 20 '05

re: Can anyone find what is wrong with the following?


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.





Tim Williams
Guest
 
Posts: n/a
#4: Jul 20 '05

re: Can anyone find what is wrong with the following?


Post the code you have that doesn't work....

Tim



"Derek Richards" <Derek2122001@yahoo.com> wrote in message
news:2d38b9ae.0310240939.489f36ee@posting.google.c om...[color=blue]
> 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.[/color]


Derek Richards
Guest
 
Posts: n/a
#5: Jul 20 '05

re: Can anyone find what is wrong with the following?


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?



"Tim Williams" <saxifrax@pacbellremovethis.net> wrote in message news:<u1h2BgomDHA.1244@TK2MSFTNGP11.phx.gbl>...[color=blue]
> Post the code you have that doesn't work....
>
> Tim
>
>
>
> "Derek Richards" <Derek2122001@yahoo.com> wrote in message
> news:2d38b9ae.0310240939.489f36ee@posting.google.c om...[color=green]
> > 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.[/color][/color]
Derek Richards
Guest
 
Posts: n/a
#6: Jul 20 '05

re: Can anyone find what is wrong with the following?


I can bet your file will be opened in Read-Only as was in my cases.


"VK" <schools_ring@yahoo.com> wrote in message news:<3f997afb$0$15705$9b622d9e@news.freenet.de>.. .[color=blue]
> 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.[/color]
Closed Thread