XLS Saveas

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

XLS Saveas

Post by serge_girard »

Hello,

I create XLS and when the sheet is ready and shown this command will ask to save:

Code: Select all

oSheet1:SaveAs("C:\folder\file.XLS") 
Then when I choose not to save I will give runtime error:

Code: Select all

Error WINOLE/1007 (0x800A03EC): SAVEAS
Parameter : [ 1] = C "C:\folder\file.XLS" (DOS Error -2147352567)
Called from TOLEAUTO:SAVEAS(0)
Is there a way to catch this error and ignore?

Greetings, Serge
There's nothing you can do that can't be done...
User avatar
vagblad
Posts: 173
Joined: Tue Jun 18, 2013 12:18 pm
DBs Used: MySQL,DBF
Location: Thessaloniki, Greece

Re: XLS Saveas

Post by vagblad »

Hi Serge,

You could try catching it with a sequence:

Code: Select all

BEGIN SEQUENCE WITH {|o| break(o)}
  oSheet1:SaveAs("C:\folder\file.XLS")
RECOVER
  Msgdebug("File not saved!")
  RETURN
END SEQUENCE
Vagelis Prodromidis
Email: vagblad@gmail.com, Skype: vagblad
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: XLS Saveas

Post by serge_girard »

Thanks, I try!
There's nothing you can do that can't be done...
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: XLS Saveas

Post by serge_girard »

It works fine!
There's nothing you can do that can't be done...
Post Reply